customizing error messages
Hi, I'm just trying this library and so far looks very promising. I cannot, however, find anywhere if it is possible to have different error messages for different validators (for a single field)? For example in Zod I could do sth like this:
z.array().min(2, 'choose at least 2').max(3, 'choose no more than 3')
Is there an equivalent in ArkType?3 Replies
Hey glad you're enjoying it!
This would be the easiest way:
nice, thank you
@ssalbdivad I think the docs for making custom error message is currently not really clear
there are cases where I need to display error messages base on the current locale (language) of the user, how can we achieve this?