Using jQuery validation plugin –
http://docs.jquery.com/Plugins/Validation
Wanting to use the remote method on a field (username) to check if the username is unique (response is in a json format – cannot use php). So, all of the remote methods I see use php with a function for processing within the php file. Obviously, with json, I can’t do that.
So using “remote”, how would I check uniqueness from a json response?
The
responseis evaluated as JSON and must betruefor valid elements, and can be anyfalse,undefinedornullfor invalid elements.Make use of plugin like this:
Above code will makes the
usernamefield required, an username and does a remote request to check if the given username is already taken.