Are the Validation Error Messages restricted when using ED Validation mechanism?
Posted: Tue 12 Feb 2013 17:43
Hi,
I am using Data Annotations, and want to use specific Error Messages for properties. It seems that one can only specify general Validation type message in ED if one uses ED's validation mechanism ie "Value is Required". I did read that perhaps one could use a resource file, but that may be more for translation.
So it seems that if I do want more specific messages ie "Please specific First Name", then the only way to do this is via a buddy class where one specifies the annotations manually. If I am correct in my thinking then perhaps a nice improvement to ED would be the ability to specify messages in the properties grid, although there is a danger everything gets hidden away as a property. Perhaps better to do it in the Class Editor Window.
Thoughts?
Ed
I am using Data Annotations, and want to use specific Error Messages for properties. It seems that one can only specify general Validation type message in ED if one uses ED's validation mechanism ie "Value is Required". I did read that perhaps one could use a resource file, but that may be more for translation.
So it seems that if I do want more specific messages ie "Please specific First Name", then the only way to do this is via a buddy class where one specifies the annotations manually. If I am correct in my thinking then perhaps a nice improvement to ED would be the ability to specify messages in the properties grid, although there is a danger everything gets hidden away as a property. Perhaps better to do it in the Class Editor Window.
Thoughts?
Ed