Package org.openxava.validators
Class BigDecimalValidator
- java.lang.Object
-
- org.openxava.validators.BigDecimalValidator
-
- All Implemented Interfaces:
java.io.Serializable
,IPropertyValidator
public class BigDecimalValidator extends java.lang.Object implements IPropertyValidator
To validate the size of integer digits and fraction digits parts.- Author:
- Ana Andres
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BigDecimalValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMaximumFractionDigits()
int
getMaximumIntegerDigits()
void
setMaximumFractionDigits(int maxinumFractionDigits)
void
setMaximumIntegerDigits(int maximumIntegerDigits)
void
validate(Messages errors, java.lang.Object value, java.lang.String propertyName, java.lang.String modelName)
Validate.
-
-
-
Method Detail
-
validate
public void validate(Messages errors, java.lang.Object value, java.lang.String propertyName, java.lang.String modelName) throws java.lang.Exception
Description copied from interface:IPropertyValidator
Validate.The validation errors are added to an object of type
Messages
.- Specified by:
validate
in 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:
java.lang.Exception
- Any unexpected problem.
-
getMaximumIntegerDigits
public int getMaximumIntegerDigits()
-
setMaximumIntegerDigits
public void setMaximumIntegerDigits(int maximumIntegerDigits)
-
getMaximumFractionDigits
public int getMaximumFractionDigits()
-
setMaximumFractionDigits
public void setMaximumFractionDigits(int maxinumFractionDigits)
-
-