To use the default method for remote, the remote page must respond with a string value of "true" or "false".
Valid (success) Must be:
echo "true";
Invalid (failure):
echo "false"; // this can be any false. eg: 0 , "" , NULL.
The response will be evaluated as JSON.
To apply an error message, other than the default for a remote response of invalid ("false"), add the input name to the validator options messages object like so.
rules:{
username:{
remote: "check-username.php"
}
},
messages:{
username:{
remote: jQuery.format('{0} is already in use, please choose a different name')
}
}