Package play.data.validation
Class Constraints.MinLengthValidator
- Object
-
- play.data.validation.Constraints.Validator<String>
-
- play.data.validation.Constraints.MinLengthValidator
-
- All Implemented Interfaces:
javax.validation.ConstraintValidator<Constraints.MinLength,String>
- Enclosing class:
- Constraints
public static class Constraints.MinLengthValidator extends Constraints.Validator<String> implements javax.validation.ConstraintValidator<Constraints.MinLength,String>
Validator for@MinLength
fields.
-
-
Constructor Summary
Constructors Constructor Description MinLengthValidator()
MinLengthValidator(long value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description F.Tuple<String,Object[]>
getErrorMessageKey()
void
initialize(Constraints.MinLength constraintAnnotation)
boolean
isValid(String object)
-
Methods inherited from class play.data.validation.Constraints.Validator
isValid
-
-
-
-
Field Detail
-
message
public static final String message
- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(Constraints.MinLength constraintAnnotation)
- Specified by:
initialize
in interfacejavax.validation.ConstraintValidator<Constraints.MinLength,String>
-
isValid
public boolean isValid(String object)
- Specified by:
isValid
in classConstraints.Validator<String>
- Parameters:
object
- the value to test.- Returns:
true
if this value is valid.
-
getErrorMessageKey
public F.Tuple<String,Object[]> getErrorMessageKey()
- Specified by:
getErrorMessageKey
in classConstraints.Validator<String>
-
-