Package com.identity4j.util.validator
Interface Validator
-
- All Known Implementing Classes:
AbstractSingleValueValidator,BooleanValidator,ColorValidator,DateValidator,DnValidator,EmailAddressValidator,FileValidator,IntegerValidator,IpAddressValidator,ListValidator,RegexValidator,StringValidator,UrlValidator
public interface ValidatorA validator for application-specific objects.This interface is totally divorced from any infrastructure or context; that is to say it is not coupled to validating only objects in the web tier, the data-access tier, or the whatever-tier. As such it is amenable to being used in any layer of an application, and supports the encapsulation of validation logic as first-class citizens in their own right.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisValueRequired()Get if the validator's rules would mean the a field value is required.Collection<ValidationError>validate(ValidationContext context, String... values)Validate the supplied values, each value is validated individually.
-
-
-
Method Detail
-
validate
Collection<ValidationError> validate(ValidationContext context, String... values)
Validate the supplied values, each value is validated individually.- Parameters:
context- TODOvalues- the values to validate- Returns:
- the collection of validation failures
-
isValueRequired
boolean isValueRequired()
Get if the validator's rules would mean the a field value is required. This is a general hint.- Returns:
- required
-
-