Reputation: 115
I am adding fields after the page load and would like to know how I can interface my JS with .net's validation summary on MVC.
Does a simple way exist?
Thx!
Upvotes: 0
Views: 2040
Reputation: 30152
The easiest method is to use jQuery and get the validation summary.
var ul = $("#validationSummary ul");
ul.append("<li>Custom Error Message</li>")
as is done here: link text
Upvotes: 2
Reputation: 1935
You can use asp.net MVC with its server side and client side validations. Basically you need to apply rules for validation while defining a models (Class Files)
Following is link which will describe Model Validation in ASP.NET MVC.
Model Validation in ASP.NET MVC
Upvotes: 0