microsoft / referencesource

Source from the Microsoft .NET Reference Source that represent a subset of the .NET Framework
https://referencesource.microsoft.com/
MIT License
3.13k stars 1.26k forks source link

Inconsequent default message handling in system validator attributes #168

Closed bang75 closed 2 years ago

bang75 commented 2 years ago

What is the reason for example EmailAdressAttribute sets DefaultMessage in constructor while RequiredAttibute sets the ErrorMessageAccessor? I think this is inconsequent and makes it harder to extend Validators with eg. a custom IValidationMetadataProvider.