@Retention(value=RUNTIME) @Target(value=METHOD) @Repeatable(value=CustomConstraintContainer.class) public @interface CustomConstraint
Example:
@CustomConstraint("constraintCode") public boolean userConstraints(User user) { return Boolean.TRUE.equals(user.getActive()); }
AccessGroup
Modifier and Type | Required Element and Description |
---|---|
java.lang.String |
value
Custom constraint code
|