DataAnnotationsModelBinder with MVC2 RTM
Posted
by yang
on Stack Overflow
See other posts from Stack Overflow
or by yang
Published on 2010-04-19T11:29:25Z
Indexed on
2010/04/19
11:33 UTC
Read the original article
Hit count: 314
asp.net-mvc
Trying to validate models with DataAnnotations but DefaulModelBinder overrides my Required property error messages and never uses my error messages for invalid data entry. Always show 'value' is invalid for 'property name'.
In another question I saw that MVC 2 uses DefaultModelBinder but I couldn't find any class in MVC 2 binaries. I downloaded the source for MVC futures and changed some source to compile it for .Net 4.0 but although I had success to compile, it has compatability problems and doesn't work as expected.
Any help is aprreciated.
© Stack Overflow or respective owner