I would like to replace the default error message for for example RequiredAttribute
or RegularExpressionAttribute
with my own messages, so that I wouldn't need to specify the explicit ErrorMessage
at attribute usage.
EDIT: Last part of the sentence means that I'm aware of the ability to specify my own ErrorMessage
at attribute usage, and I would like to avoid it for keeping the project DRY.
Is it possible somehow? I haven't found any related property in the .NET library, and I currently have no idea how I could replace the .NET resources where the default messages are stored.