Package play.data.validation
Class Constraints.Validator<T>
- Object
-
- play.data.validation.Constraints.Validator<T>
-
- Direct Known Subclasses:
Constraints.EmailValidator
,Constraints.MaxLengthValidator
,Constraints.MaxValidator
,Constraints.MinLengthValidator
,Constraints.MinValidator
,Constraints.PatternValidator
,Constraints.RequiredValidator
,Constraints.ValidateWithValidator
- Enclosing class:
- Constraints
public abstract static class Constraints.Validator<T> extends Object
Super-type for validators.
-
-
Constructor Summary
Constructors Constructor Description Validator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract F.Tuple<String,Object[]>
getErrorMessageKey()
abstract boolean
isValid(T object)
boolean
isValid(T object, javax.validation.ConstraintValidatorContext constraintContext)
-
-
-
Method Detail
-
isValid
public abstract boolean isValid(T object)
- Parameters:
object
- the value to test.- Returns:
true
if this value is valid.
-
isValid
public boolean isValid(T object, javax.validation.ConstraintValidatorContext constraintContext)
- Parameters:
object
- the object to checkconstraintContext
- The JSR-303 validation context.- Returns:
true
if this value is valid for the given constraint.
-
-