Constraints in Bean Validation are expressed via Java annotations.
In this section we show how to annotate an object model with these annotations.
Checks whether the given script can successfully be evaluated against the annotated element.
In order to use this constraint, an implementation of the Java Scripting API as defined by JSR 223 ("Scripting for the Java Platform") must part of the class path.
To do so, just annotate a field or property representing a reference to another object with instance is added for each violated constraint.