Html.ValidationSummary()
[StringLength(160)]
public string FirstName { get; set; }
[RegularExpression(@"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}")]
public string Email { get; set; }
[Range(10,25)]
public int Age { get; set; }
public string Password { get; set; }
[Compare("Password")]
public string ConfirmPass { get; set; }
<script src="<%= Url.Content("~/Scripts/jquery-1.5.1.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/jquery.validate.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/jquery.validate.unobtrusive.js") %>" type="text/javascript"></script>
Hiç yorum yok:
Yorum Gönder