top button
Flag Notify
Site Registration

How can we enable data annotation validation on client side?

+5 votes
184 views
How can we enable data annotation validation on client side?
posted Aug 11, 2015 by Shivaranjini

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

1 Answer

0 votes

It’s a two-step process: first reference the necessary jQuery files.

<script src="<%= Url.Content("~/Scripts/jquery-1.5.1.js") %>" type="text/javascript"></script>

The second step is to call the EnableClientValidation method.

<% Html.EnableClientValidation(); %> 
answer Aug 28, 2015 by Manikandan J
...