I'm adding a custom method to jquery validation that calls a webservice, but the web service returns more then just a开发者_运维技巧 boolean. Is it possible to show the error based on return call of the web service. e.g. say I want an email address to be valid & not in use, so my web service checks this an returns 0 - ok, 1 - not valid, 2 - in use. How can I get jquery to show to correct error message based in the response ?
Please check this links for reference,if u are using asp.net(c#)
jQuery Remote Validation with ASP.Net Webservices
The power of CustomValidator - Validate with WebServices
Check Existing Values with ASP.NET CustomValidator + jQuery $.ajax()
ASP.NET MVC Client-Side Validation Summary with jQuery Validation Plugin
精彩评论