0

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!

Heinz
  • 115
  • 6

2 Answers2

2

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

Johnathon Sullinger
  • 7,097
  • 5
  • 37
  • 102
Adam Tuliper
  • 29,982
  • 4
  • 53
  • 71
0

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

Kailas Mane
  • 1,877
  • 1
  • 15
  • 12