Last active
April 2, 2017 21:54
-
-
Save naturalwarren/312c901929028667fe05d64c0a33dfe5 to your computer and use it in GitHub Desktop.
Demonstrates how to use RAVE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UsingRave { | |
public static void main(String[] args) { | |
MyModel myModel = new MyModel(“Validate me please!”); | |
try { | |
Rave.getInstance().validate(myModel); | |
} catch (RaveException e) { | |
// This response didn't pass RAVE validation, throw an exception. | |
throw new RuntimeException(e); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment