javascript - How to enable and disable Required Validation group for fields and Expressions fields when a div is shown -
i have credit card transaction area in form hide , show based on user's selection in radio button group. credit card piece required validations , required expressions in validation group. wondering if enabling , disabling validation group in j query. in advance guys' help!
i have class indicates whether field should validated or not, when field should validated hidden, remove class. add again when displayed.
a more elegant solution disable validation of hidden fields:
$('myform').submit(function() { $('myform').find('validate:visible').foreach( ... ); });
Comments
Post a Comment