Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message interpolation callback for custom server-side jakarta validations #1915

Open
taefi opened this issue Dec 20, 2023 · 0 comments
Open
Labels
enhancement New feature or request hilla Issues related to Hilla

Comments

@taefi
Copy link
Contributor

taefi commented Dec 20, 2023

Describe your motivation

Having custom JSR380 validations on the backend, it would be handy if there was a way of intercepting to the message returned by the endpoint to translate it before presenting them to the user. The i18n of the messages for server-side validations can be handled at the backend as well, but having all the translations on the client-side makes it easier to maintain.

Describe the solution you'd like

A message interpolation callback that accepts the name of the failed validations, and any additional contextual parameters and values from the validation errors that can help with finding the translation, and filling out the message parameters.

Describe alternatives you've considered

No response

Additional context

No response

@taefi taefi added enhancement New feature or request hilla Issues related to Hilla labels Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hilla Issues related to Hilla
Projects
None yet
Development

No branches or pull requests

1 participant