Skip to content

Instantly share code, notes, and snippets.

@naturalwarren
Last active April 2, 2017 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naturalwarren/312c901929028667fe05d64c0a33dfe5 to your computer and use it in GitHub Desktop.
Save naturalwarren/312c901929028667fe05d64c0a33dfe5 to your computer and use it in GitHub Desktop.
Demonstrates how to use RAVE
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