How to use validwhen in validation.xml in Struts 1.3.5
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rinku_Sarkar
Posted On:   Monday, September 10, 2007 11:44 AM

I am trying to use validwhen in my code in validation.xml The code fragment in validation.xml looks like this: test ((saveThisCardInputText != null)and(saveThisCard == "true")) maxlength 50 mask ${alphaNumericSpace} The condition is that if in the HTML page the checkbox 'saveThisCard' is checked then the textbox beside it 'saveThisCardInputText' has to be filled.It cannot be empty. I am using Struts1.3.5. Even when the checkbox is not checked it is giving me a Struts validation error that SaveThiscardInputText is required. Appreciate any help.    More>>

I am trying to use validwhen in my code in validation.xml

The code fragment in validation.xml looks like this:





test
((saveThisCardInputText != null)and(saveThisCard == "true"))



maxlength
50


mask
${alphaNumericSpace}




The condition is that if in the HTML page the checkbox 'saveThisCard' is checked then the textbox beside it 'saveThisCardInputText' has to be filled.It cannot be empty.

I am using Struts1.3.5. Even when the checkbox is not checked it is giving me a Struts validation error that SaveThiscardInputText is required.

Appreciate any help.

Thanks,
Rinku    <<Less
About | Sitemap | Contact