| Package | Description |
|---|---|
| com.erudika.para.core |
Core domain classes for modeling the Para domain space.
|
| com.erudika.para.validation |
Object validation utilities.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
App.addValidationConstraint(String type,
String field,
Constraint c)
Adds a new constraint to the list of constraints for a given field and type.
|
| Modifier and Type | Method and Description |
|---|---|
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)
|
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.
|
Copyright © 2018 Erudika. All rights reserved.