Custom error messages in schema


I am trying to get custom validation messages working using ajv-errors.
A custom message for a format error is working but I cannot get a custom error message for ‘required’ working.


"zipcode": { "type": "string", "format": "postcode", "errorMessage": {"required": "Postcode is required", "format": "Postcode is in the wrong format"}},

So In case of a format-error I get the customized message
But in case of a required error I get the default error message…

What am I doing wrong?

Hi @cornelos,

the required is technically an error on the parent of the property not on the property itself. So I would try to customize the error there.

Note that we also now have quite some nice translation support in JSON Forms (via the prop i18n) which also allows you to customize the error messages. However this is not yet documented. If you want to try it, you can find some information here.

Doesn’t helps me much. How do I use this l18n feature with The Vue vanilla renderer?
Where I have to put the keys in (ui)schema?

best regards,

Hi @svnt, the documentation is not yet finished but a much more comprehensive state is available here. If something is missing or confusing please leave a comment in the PR.