Custom error message with conditions and i18n
Hi i am new here, and i try to create translated error messages. i have a schema like this.
The output : price ("") must be...
◦ a well-formed numeric string
◦ non-empty
But i want a bit different.
If value empty i want a "Required" message.
If value is non-empty and not a numeric string i want a "Must be a number" message.
The custom message from the configure only appears if the price is not empty.
Can you help me out please?
Used in Nuxt3 with Regle, the message translated with i18n inside the configure's message return. I couldn't find a better solution
2 Replies
I have another problem. I have created an issue in Regle repo, but it is may not an issue if i did something wrong
https://github.com/victorgarciaesgi/regle/issues/137
Can you take a look at this also?
Have you found any solution with ArkType ?