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