I am hiding some fields based on some condition, i.e. in UI they won’t be visible , but clicking on submit button ,struts is validating these hidden fields ..
Is there a way to tell struts not to validate fields which are hidden … i.,e validate these fields only when they are visible on UI.
I am using struts 1.2 framework.
Set a property on your form when you trigger these conditions and then check for that in your validator:
In javascript you can set this property with a hidden input field:
hope this is helpful…