Try this:

var validator = $("#myform").validate(...);
$(".button").click(function() {
  validator.settings.submitHandler = function() { ... };
});

Jörn

On Fri, Mar 6, 2009 at 1:02 PM, Mark Perry <markperr...@googlemail.com> wrote:
>
> Hi
>
> This is a strange question I know but I would like to modify the
> validate options to my form based on a click of a button. For example
> my default onload code sets up the .validateI() class with my options
> then based on a user clicking a button I want to override the
> "submitHandler" options with some new code.
>
> so in short:
>
> $(document).ready(function(){
>   $('#form').validate();
> });
>
> function changevalidateoptions()
> {
>  //Set my new options here
> }
>
> Thanks, Mark

Reply via email to