|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.springlayout.web.validator.AbstractValidationRule
net.sf.springlayout.web.validator.DecimalValidator
public class DecimalValidator
Provides type validation for decimals with the ability to specify a maxuimum number of decimal places
Constructor Summary | |
---|---|
DecimalValidator()
|
Method Summary | |
---|---|
java.lang.String |
getJavascript()
Get the javascript used to validate this rule |
int |
getMaxDecimalPlaces()
|
boolean |
isValid(java.lang.Object obj,
java.lang.String fieldKey)
As with the validate method, if it gets this far then the field value must be valid. |
void |
setMaxDecimalPlaces(int maxDecimalPlaces)
Specify the max number of decimal places to test for. |
void |
validate(javax.servlet.http.HttpServletRequest request,
java.lang.Object obj,
org.springframework.validation.Errors errors,
java.lang.String fieldKey)
This method is not implemented as valdiating of types is taken care of through the binding process. |
Methods inherited from class net.sf.springlayout.web.validator.AbstractValidationRule |
---|
conditionallyValidate, getCondition, getConditionalJavascript, getFieldValue, setCondition |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DecimalValidator()
Method Detail |
---|
public int getMaxDecimalPlaces()
public void setMaxDecimalPlaces(int maxDecimalPlaces)
maxDecimalPlaces
- the maxDecimalPlaces to setpublic void validate(javax.servlet.http.HttpServletRequest request, java.lang.Object obj, org.springframework.validation.Errors errors, java.lang.String fieldKey)
validate
in class AbstractValidationRule
net.sf.springlayout.web.validator.ValidationRule#validate(javax.servlet.http.HttpServletRequest,
java.lang.Object, org.springframework.validation.Errors,
java.lang.String)
public boolean isValid(java.lang.Object obj, java.lang.String fieldKey)
ValidationRule.isValid(java.lang.Object,
java.lang.String)
public java.lang.String getJavascript()
AbstractValidationRule
getJavascript
in class AbstractValidationRule
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |