Closed benjamingb closed 5 months ago
The payloads of the enum ContraintViolation
have a field code
. The idea of this field is, that it contains a predefined key that can be mapped to a user friendly message in any language. The code
s that are used by the validations provided by this crate can be found in the module validation
. The defined codes are the constants with names like INVALID_..... The translation of the messages and how to choose a users language is no scope of this crate. It should be possible to combine this crate with any lib that provides localization support.
How can I customize the default message? I want it to come out in another language