static Constraint |
Constraint.build(String cname,
Map<String,Object> payload) |
Builds a new constraint from a given name and payload.
|
static Constraint |
Constraint.digits(Number integer,
Number fraction) |
The 'digits' constraint - field must be a Number or String containing digits where the
number of digits in the integral part is limited by 'integer', and the
number of digits for the fractional part is limited
by 'fraction'.
|
static Constraint |
Constraint.email() |
The 'email' constraint - field must contain a valid email.
|
static Constraint |
Constraint.falsy() |
The 'falsy' constraint - field value must not be equal to 'true'.
|
static Constraint |
Constraint.fromAnnotation(Annotation anno) |
Builds a new constraint from the annotation data.
|
static Constraint |
Constraint.future() |
The 'future' constraint - field value must be a Date or a timestamp in the future.
|
static Constraint |
Constraint.max(Number max) |
The 'max' constraint - field must contain a number smaller than or equal to max.
|
static Constraint |
Constraint.min(Number min) |
The 'min' constraint - field must contain a number larger than or equal to min.
|
static Constraint |
Constraint.past() |
The 'past' constraint - field value must be a Date or a timestamp in the past.
|
static Constraint |
Constraint.pattern(Object regex) |
The 'pattern' constraint - field must contain a value matching a regular expression.
|
static Constraint |
Constraint.required() |
The 'required' constraint - marks a field as required.
|
static Constraint |
Constraint.size(Number min,
Number max) |
The 'size' constraint - field must be a String, Map, Collection or array
with a given minimum and maximum length.
|
static Constraint |
Constraint.truthy() |
The 'truthy' constraint - field value must be equal to 'true'.
|
static Constraint |
Constraint.url() |
The 'url' constraint - field value must be a valid URL.
|