Unobstructive client side validation for dynamically added input fields

做~自己de王妃 提交于 2019-12-07 02:25:29

You should reparse the validation rules for all dynamically added elements:

$("form").removeData("validator");
$("form").removeData("unobtrusiveValidation");
$.validator.unobtrusive.parse("form");

the following validation plugin might help you

http://docs.jquery.com/Plugins/Validation

Also the the examples listed at the end of the page to get idea about how to use them effectively...

You need to add the class for the fields you want to validate.....

also you can provide inputmask for phone no, credit card no, etc....

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!