...
Code Block | ||
---|---|---|
| ||
// Validate that a number is odd @Validate(expression="thisself % 2 == 1") private int oddNumber; // Validate that this number is bigger than the odd number @Validate(expression="oddNumber != null && self > oddNumber") private long biggerNumber; // Validate that a username is the current user's, or the current user is 'root' @Validate(expression="context.user.name=='root' || self==context.user.name") private String name; |
...