Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Dinamically removing :required class #4

alexbazan opened this Issue · 4 comments

4 participants


Hi, i've got a form in which some elements are required when some conditions are met.

When i add the :required class to the elements and perform Vanadium.init() ; Vanadium.reset() the new required fields are show correctly.

The problem is when i remove via JS the :required class. After init() and reset(), though the field shows the vanadium-valid class, it does not submit the form because somewhere still thinks it is required.



Same problem. Anyone know how to repair that?


Yeah... only thing you could try to do is copy element and remove :required class.


Fixed in my forked version with ABrukish@9e12ca7


Hi ABrukish, as you said, your fork version solves the problem but adds another one. I have two fields, A & B required in my form. With a checkbox i manage which of them appears visible and 'required' meanwhile the other is hidden and 'unrequired' adding and removing the class ':required' and reseting and initializating the component with Vanadium.reset() and Vanadium.init() methods... The problem is that if i check and uncheck the checkbox X times... when I submit the form, if there are errors, appears the 'error message' as often as checks & unckecks i've made.

Am i doing something wrong?

Thank you in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.