Package play.data.validation
Class Constraints.MaxValidator
- Object
-
- play.data.validation.Constraints.Validator<Number>
-
- play.data.validation.Constraints.MaxValidator
-
- All Implemented Interfaces:
javax.validation.ConstraintValidator<Constraints.Max,Number>
- Enclosing class:
- Constraints
public static class Constraints.MaxValidator extends Constraints.Validator<Number> implements javax.validation.ConstraintValidator<Constraints.Max,Number>
Validator for@Max
fields.
-
-
Constructor Summary
Constructors Constructor Description MaxValidator()
MaxValidator(long value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description F.Tuple<String,Object[]>
getErrorMessageKey()
void
initialize(Constraints.Max constraintAnnotation)
boolean
isValid(Number 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.Max constraintAnnotation)
- Specified by:
initialize
in interfacejavax.validation.ConstraintValidator<Constraints.Max,Number>
-
isValid
public boolean isValid(Number object)
- Specified by:
isValid
in classConstraints.Validator<Number>
- 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<Number>
-
-