MVC Datatype ErrorMessage

前端 未结 2 1814
栀梦
栀梦 2021-01-12 13:11

DataType ErrorMessage doesn\'t work. MVC4 DataType ErrorMessage doesn\'t seem to work. I have this dataannotation Attribute:

[DataType(DataType.DateTime, Err         


        
2条回答
  •  春和景丽
    2021-01-12 13:57

    On MVC 4 I was able to change the error message in the View with Html.ValidationMessageFor.
    See an example:@Html.ValidationMessageFor(model => model.FechaDesde, "Fecha Inválida")

提交回复
热议问题