Ray's Asp.net Blog
Answers and code snippets from ASP.NET projects (Webforms/MVC/Classic ASP)
Pages
Event registration app with QR/Paypal
Home
Friday, January 6, 2012
How to make one field is optional (not required) in ASP.NET MVC data annotations for validation?
Make that field is nullable in model. Such as:
[
Display
(Name =
"ID"
)]
public
int
?
ID {
get
;
set
; }
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)