RickStrahl / Westwind.Globalization

Database driven resource localization for .NET applications
543 stars 135 forks source link

Localize Data Annotations with .NET Core #159

Closed kacperryniec closed 5 years ago

kacperryniec commented 5 years ago

Hello,

Is it possible to translate ErrorMessage for custom implemented Validation Attributes derived from System.ComponentModel.DataAnnotations.ValidationAttribute ?

The localization seems to work fine for out of the box attributes like [Required] but not if I implement a custom attribute.

kacperryniec commented 5 years ago

Found this description that solves the above: https://stackoverflow.com/questions/42784311/asp-net-core-custom-validation-attribute-localization