ruby on rails - override really easy field validation -
i use really-easy-field-validation prototype plugin.
in form have 2 buttons, , need validate when "send" button hit, when 2nd button - "save" hit, want form submitted no validation.
how can achieve that?
if else comes same problem, here workarount had used.
i used jquery in following way, when pressing button did not want validation happen, changed classes names 'required' or 'validate-number' 'overridevalidation'. saved each class name in $.data powerful object. that, plugin didn't have nothing validate since relies on these names.
when pressing other button, took clesses names $.data object , put them back.
hope of you.
Comments
Post a Comment