I am working on a way of conditional validation.  The reason is this:  I have a form that has a condition in it, if the user answers less than 3 to a question, then they are required to fill out 4 more fields that each have validation attached to them.  If they answer more than 3 then the fields are not required (and therefore should not be validated).  As the validators and forms currently stand this cannot be done.
 
What I would like to see is a method added to the Form called removeEventListener that would allow me to remove the Javascript event listener for the validators that need to be conditionally run.  (They will be called from within the Conditional Validators javascript block if criteria is matched).
 
Secondly, I would need a Runnable property added to the Validators that would stop them from running if they were not "Runnable" (or more precisely, pass over the validation steps and return the value).   The reason for this is that the Conditional would explicitly turn on or off this property to deal with the conditional criteria within Java (with the help of OGNL).  The name "Runnable" may not be correct, suggestions welcome.
 
I am willing to do all the changes and submit them, but I obviously need everyones input and help in define this component so that is of best value to the community.  (It may not even be wanted at this point).

Reply via email to