jQuery Validate Plugin: Can I send a failure message back from the server using remote?
The docs for the remote method (
http://docs.jquery.com/Plugins/Validation/Methods/remote#options) seem to suggest this is possible:
The response is evaluated as JSON and must be true for valid elements, and can be any false, undefined or null for invalid elements, using the default message; or a string, eg. "That name is already taken, try peter123 instead"to display as the error message.
But I cannot seem to get it to work. I've tried returning both:
My failure message.
and
"My failure message."
And in each case no message is displayed on the form.
Is this possible, and if so do I need to use a particular format to get it to work?
Thanks,
Bob