I'm reading about enhacement开发者_如何学Gos in ASP.NET MVC 2, and as we see, there is a topic about "Support for DataAnnotations Attributes": RangeAttribute, RequiredAttribute, StringLengthAttribute, and RegexAttribute. Were they available in MVC v1 ?
The DataAnnotations
attributes lie in namespace System.ComponentModel.DataAnnotations
. The ASP.NET MVC 2 includes built in support for the DataAnnotation validation. ASP.NET MVC 1 not support built in DataAnnotation support(for validation), it needs Data Annotations Model Binder as described here.
精彩评论