play.data.validation
Class Constraints.Validator<T>

java.lang.Object
  extended by play.data.validation.Constraints.Validator<T>
Direct Known Subclasses:
Constraints.EmailValidator, Constraints.MaxLengthValidator, Constraints.MaxValidator, Constraints.MinLengthValidator, Constraints.MinValidator, Constraints.PatternValidator, Constraints.RequiredValidator
Enclosing class:
Constraints

public abstract static class Constraints.Validator<T>
extends java.lang.Object

Super-type for validators.


Constructor Summary
Constraints.Validator()
           
 
Method Summary
abstract  boolean isValid(T object)
          Returns true if this value is valid.
 boolean isValid(T object, javax.validation.ConstraintValidatorContext constraintContext)
          Returns true if this value is valid for the given constraint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Constraints.Validator

public Constraints.Validator()
Method Detail

isValid

public abstract boolean isValid(T object)
Returns true if this value is valid.


isValid

public boolean isValid(T object,
                       javax.validation.ConstraintValidatorContext constraintContext)
Returns true if this value is valid for the given constraint.

Parameters:
constraintContext - The JSR-303 validation context.