Package org.openxava.validators
Class BigDecimalValidator
java.lang.Object
org.openxava.validators.BigDecimalValidator
- All Implemented Interfaces:
Serializable,IPropertyValidator
To validate the size of integer digits and fraction digits parts.
- Author:
- Ana Andres
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintvoidsetMaximumFractionDigits(int maxinumFractionDigits) voidsetMaximumIntegerDigits(int maximumIntegerDigits) voidValidate.
-
Constructor Details
-
BigDecimalValidator
public BigDecimalValidator()
-
-
Method Details
-
validate
public void validate(Messages errors, Object value, String propertyName, String modelName) throws Exception Description copied from interface:IPropertyValidatorValidate.The validation errors are added to an object of type
Messages.- Specified by:
validatein interfaceIPropertyValidator- Parameters:
errors- Not null. Ids list to read in the resources filevalue- Value to validate. It can be nullpropertyName- Property id in the resources filemodelName- Object id in the resources file.- Throws:
Exception- Any unexpected problem.
-
getMaximumIntegerDigits
public int getMaximumIntegerDigits() -
setMaximumIntegerDigits
public void setMaximumIntegerDigits(int maximumIntegerDigits) -
getMaximumFractionDigits
public int getMaximumFractionDigits() -
setMaximumFractionDigits
public void setMaximumFractionDigits(int maxinumFractionDigits)
-