[jQuery] [Validate plugin] Question about the 'remote' AJAX option
Hi,
I trying to replace my old AJAX system by the Validate plugin of
jQuery with the "remote" option.
There is a way to return a custom error message directly from the
server side script ?
For example, I have a "username.php" server side script that check :
- If the username is not used by someone else
- If the username doesn't contains any bad words
So, the error message could be different.
If not, the only solution I see is to create special rules that
explicitly uses $.ajax() but this mean this will do 2 AJAX calls on
this page... it's not the best solution.
Thanks in advance for your advices !