Is the DataTypeAttribute validation working in MVC2?

后端 未结 5 1447
鱼传尺愫
鱼传尺愫 2020-12-03 07:26

As far as I know the System.ComponentModel.DataAnnotations.DataTypeAttribute not works in model validation in MVC v1. For example,

public class Model
{
  [Da         


        
5条回答
  •  甜味超标
    2020-12-03 07:54

    Check out Scott Guthrie's blog post on MVC 2 validation. It is excellent. http://weblogs.asp.net/scottgu/archive/2010/01/15/asp-net-mvc-2-model-validation.aspx

提交回复
热议问题