networknt / json-schema-validator

A fast Java JSON schema validator that supports draft V4, V6, V7, V2019-09 and V2020-12
Apache License 2.0
822 stars 323 forks source link

How to set the language type of networknt exception information #982

Closed Dloadinghao closed 6 months ago

Dloadinghao commented 6 months ago

Does the networknt have a built-in method to modify the language type of exception information For example, I would like the language type of exception information to be unified in English

justin-tay commented 6 months ago

If you are referring to the validation messages, by default it will use the system locale.

You can either set the system locale, via Locale.setDefault or configure the SchemaValidatorsConfig with Locale.ENGLISH.

Dloadinghao commented 6 months ago

If you are referring to the validation messages, by default it will use the system locale.

You can either set the system locale, via Locale.setDefault or configure the SchemaValidatorsConfig with Locale.ENGLISH.

Thank you for your reply. My problem has been solved