rickharrison/validate.js

How can I ignore input for validation?

satch84 opened this issue · 0 comments

Hello!

Here is my problem, I have a form with 5 inputs (always shown, need validation) + 3 inputs with attribute disabled in a display:none div. If the div is opened, the disabled attribute is removed and the inputs should be checked by the validator. If the div is closed, the inputs should be ignored by validator.

So far, the validation is ok, it works fine as it should for the 5 inputs, but when the div with the 3 disabled inputs is closed, the validator still returns errors, it should return errors for no completion only if the div is opened, thus, if the inputs does'nt have the disabled attribute.

So, how could I set a rule to tell the validator "if the input is disabled, just ignore it"?

Thank you for reading!
Satch