Localization on attributes #51355
-
[StringLength(3, ErrorMessage = "Name is too long")] Can we use localization in such attributes, in a future ASP.NET Core version, without writing our own attributes? [StringLength(3, ErrorMessage = localizationRef("TooLongErrorMessage"))] |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Have you tried the approaches documented here? https://learn.microsoft.com/aspnet/core/fundamentals/localization/make-content-localizable#dataannotations-localization |
Beta Was this translation helpful? Give feedback.
Have you tried the approaches documented here? https://learn.microsoft.com/aspnet/core/fundamentals/localization/make-content-localizable#dataannotations-localization