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!
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!
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
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.