MVC 4 DataAnnotations do not seem to work

Annotations like DataType.Date on a model work fine in a scratch MVC app.  But I have inherited a MVC 4 Razor solution where they do not work at all.  It does use twitter bootstrap but I cannot see how that disables the annotations.  Any suggestion on why they do not work?  How to get them working?

  [DisplayName("From Date")]
  [DataType(DataType.Date)]
  public DateTime DateFrom { get; set; }
wilfordrocksAsked:
Who is Participating?
 
Mihai StancescuConnect With a Mentor Software Engineer Commented:
Hi,

You can use custom edit templates for base types to render different inputs or html tags.

For more info check this link .


Regards,
Mishu
0
 
StephanLead Software EngineerCommented:
What are you expecting from your application? That the input type will convert to a input type="date"?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.