Validation for Ajax submitted form Magento 188.8.131.52?
I am having a form that has many fields(The form is on custom phtm page). I already put some js classes for validation (i.e. in validation.js file) But i have fields that displayed when we select a particular radio button if the other radio button is selected the div that contains all that fields will going to hide but all that fields are submitted with my form, and i want to control that if the first radio button is selected these fields should not be check for validation and if the other one on which they all are depend is selected all these fields are check for validation and the form is submitted via Ajax.
Please guide me how can i put validations on such fields and also for ajax submitted form. Thanks in anticipation.