micronaut-core icon indicating copy to clipboard operation
micronaut-core copied to clipboard

I18n for Bean Validation constraint messages

Open fmonorchio opened this issue 3 years ago • 3 comments

Feature description

Hi all,

I'm trying to translate the constraint violation messages of Bean Validation in the user language. I have created a custom MessageSource with the correct property keys like 'javax.validation.constraints.Size.message' but seems that, the message is translated using the system locale only and not that of the user that I can retrieve from HttpRequest. From what I have discovered the DefaultValidator use the MessageSource without specifing any locale. I think that can be useful to plug a specific one instead. Thanks.

fmonorchio avatar Aug 17 '22 11:08 fmonorchio

There are news about this? Thanks

francesco-monorchio avatar Jan 02 '23 09:01 francesco-monorchio

Hello Indeed, that would be a nice feature

FrogDevelopper avatar Jun 10 '24 19:06 FrogDevelopper

not yet

graemerocher avatar Jun 18 '24 12:06 graemerocher