Hi there
I'm building a login form, with a "Forgot password" link. When
clicked, I need to unset some validation options to successfully
submit the form.

The code I'm running does this:

        1 - remove the validation constraints from the password field
        2 - hide any error messages that were displayed for the password
field
        3 - submit the form using form.submit()

However, I can't seem to do either properly. Here's the code I'm
using:

        $('#password').attr('validation', '')
        $('label.error[for="password"]').hide()
        $("#login").validate()


The problems are:

        1 - form.submit() seems to bypass any of the validation
        2 - if I click the submit button manually, the initial validation
kicks in and the password error is re-displayed

Can anyone shed any light on what I should be doing. I'm not sure if
there are already options for this, alrthough I've looked through the
docs several times over.

Thanks,
Dave

Reply via email to