How to handle AUI form-validation with dynamic fields?

As far as I see it is not suposed for doing dynamic stuff - register the validation stuff for the form exactly one time, submit the form, validation gets “lost” because of the rerendering…

in order to “abuse” the functionality I did a quick an dirty workaround: each time the main select box changes I “unvalidate” each of the dependent selectboxes eg:

$(selector).attr('data-aui-validation-state','unvalidated');

in my scenario this works fine!

1 Like