public class NotNegativeValidator extends java.lang.Object implements IPropertyValidator, IWithMessage
Constructor and Description |
---|
NotNegativeValidator() |
Modifier and Type | Method and Description |
---|---|
void |
setMessage(java.lang.String message) |
void |
validate(Messages errors,
java.lang.Object object,
java.lang.String propertyName,
java.lang.String modelName)
Validate.
|
public void validate(Messages errors, java.lang.Object object, java.lang.String propertyName, java.lang.String modelName)
IPropertyValidator
The validation errors are added to an object of type Messages
.
validate
in interface IPropertyValidator
errors
- Not null. Ids list to read in the resources fileobject
- Value to validate. It can be nullpropertyName
- Property id in the resources filemodelName
- Object id in the resources file.public void setMessage(java.lang.String message)
setMessage
in interface IWithMessage