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

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -