views:

617

answers:

1

I am currently using jQuery validation plugin with cakephp in my new project.

It's working perfectly untill I need to make unique check to email field through ajax to check with the database..

I didn't know how to make the plugin make a unique validation to email from db.

thanx

+3  A: 

I reckon you are refering to using an AJAX call (via the plugin) to check for unique email with the server, yea?

I would suggest using the addMethod of the validation plugin to create a custom validation in which you can make an AJAX call (which will be part of the jQuery core).

There's an SO post on this topic which you can explore:
JQuery Validate Plugin - How to create a simple, custom rule?

Do note that you will have to implement the server-side script yourself.

Here's another article which should be useful (using jQuery and PHP):
Check email already exist – Ajax – Jquery

o.k.w
u exatecly understand me but i didn't now to this indide the pluginthanx again
assaqqaf