Hi all,
I am trying to validate a field against 'double', In
validation.xml i have specified the validation logic as.
<field property="fieldName" depends="double">
<arg0 key="formName.fieldName"/>
</field>
This is not working, but it will work fine If I change it to' depends
="integer" ' instead of "double".
In my validatior-rules.xml file I have written the rule as
FOR 'integer'
<validator name="required"
classname="org.apache.struts.validator.FieldChecks"
method="validateRequired"
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionMessages,
org.apache.commons.validator.Validator,
javax.servlet.http.HttpServletRequest"
msg="errors.required"/>
FOR 'double'
< validator name="double"
classname="org.apache.struts.validator.FieldChecks"
method="validateDouble"
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionMessages,
org.apache.commons.validator.Validator,
javax.servlet.http.HttpServletRequest"
depends=""
msg="errors.double"
jsFunctionName="DoubleValidations"/>
What I am really curious about is that when its working fine for 'integer'
why not for 'double'
Thanks
Antony
--
View this message in context:
http://www.nabble.com/Validation-not-working-for-%27double%27-with-Struts-1.2-t1754076.html#a4769223
Sent from the Struts - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]