| 1. |
How To Use Jquery Plugins In Asp.net Mvc Validation? |
|
Answer» We can USE dataannotations for validation in ASP.Net MVC. If we want to use validation during runtime using Jquery then we can use Jquery plugins for validation. Eg: If validation is to be DONE on customer NAME textbox then we can do as : $('#CustomerName').rules("ADD", { required: true, minlength: 2, messages: { required: "Please ENTER name", minlength: "Minimum length is 2" } }); We can use dataannotations for validation in ASP.Net MVC. If we want to use validation during runtime using Jquery then we can use Jquery plugins for validation. Eg: If validation is to be done on customer name textbox then we can do as : $('#CustomerName').rules("add", { required: true, minlength: 2, messages: { required: "Please enter name", minlength: "Minimum length is 2" } }); |
|