I am using the jquery validation and i need to validate an email.
I use
$("#myForm").validate({
rules:
email: {
required: true,
email: true
}
})
SO FAR so good. The problem is that i need to make an ajax call to verify if given email already exist.If exist display message "This email already exits.Please selecte other".
Can anyone help me implement this.
Best Answer
That path will be passed the value of the field in a $_GET. so.. what actually gets called in your case would be:
Have the server side code return just the text true or false.
Then the corresponding message also named remote.
My code for something similar:
The corresponding server side code in php:
Of course that's using my database abstraction stuff, but you get it.