I have to make a custom validation for a fiel what be must validate by api.
The server response is always a array []
, that can be empty, 1 result, n result.
My valid case is when is exaclty 1, the other 2 must be separeted in two diferent error messages.
The problem particulary is, the default remote option doesn´t work for my custom rule, and the async validation always fail.
Considere this code as example :
http://jsfiddle.net/84fefw4z/2/
- How can add a remote rule validation with:
jQuery.validator.addMethod(...);
? - Is possible add a rule with 2 error messages?