Validator does not provide client-side (JavaScript) validation for "requiredif" and "validwhen". It is my understanding that it is not practical to create a JavaScript reusable, generic function for these validations that plays in the Validator framework.

However, if you really need this validation client-side than writing a one-off JS function to perform this check is not that difficult. You might want to check out a good JavaScript site (there are several -- just google JavaScript) -- in addition, the O'Reilly JavaScript book is a must-read if you are doing a lot of JS.

Diego wrote:

Hi everyone. I need to perform conditional validation in one of my forms. I have
a drop-down list and a text field. The validation applied to the text field
should be dependent on the value selected on the drop-down list. Is this
possible, using the Struts validator? I've taken a look at the "validwhen"
validator but I don't see how could this be done. I want a solution that allows
me to use Javascript validation.

Thanks in advance.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to