Dave Stewart schrieb:
Hi Jorn,
Yup - here's a test page:

        http://www.janepatrick.co.uk/admin/test/login.php

Submitting the form manually (as you said) just bypasses any
validation, which is NOT what I want, as I still need the email
address validated before it's sent to the back end to email the
password...

Using:

        $('#login').submit()

fires off the validation just fine (but I still need to kill the
validation on the password field)

I hope you have enough information now to help me out!
Ok, I think I found the issue here. Its caused by the metadata plugin, which caches the data it reads from the DOM. So setting attr("validate") yields nothing, because the validation plugin uses metadata() to access the metadata which uses jQuery's data API to cache the value. So in this case this removes the required rule from the password field:

delete $("#password").metadata().required;

Hope that works for you. Let me know about the results, I'd like to add that to a FAQ or as an example in the docs somewhere.

Jörn

Reply via email to