top button
Flag Notify
Site Registration

How to use Jquery Plugins in ASP.Net MVC validation?

0 votes
1,051 views
How to use Jquery Plugins in ASP.Net MVC validation?
posted Aug 30, 2016 by Sathaybama

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

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"
}
});
answer Aug 31, 2016 by Shivaranjini
...