views:

114

answers:

1

I have a site and I am using this plugin for validation in the registration process. I have seen sites where when you exit the email address field, it goes out and checks to see if the email address exists before you hits the submit button. I know this is ajax but I cannot figure it out.

How do you validate if an email address (or any field) already exists before the users submits the form?

A: 

Check out the Source Code here

http://jquery.bassistance.de/validate/demo/milk/

Your Rule to check for an e-mail address might look like this

        email: {
            required: true,
            email: true,
            remote: "emails.php"
        }

you would need to write the script server side to query your database and return true or false depending on whether or not the e-mail address had been used already.

calumbrodie
Perfect, I thought it had to be something simple that I was missing. Much thanks!
Zach Girod