[FEATURE] allow changing the key which looks for the error message
Hey, I would like to use this library with Elysia, but Elysia uses the "error" property for custom error messages, instead of "errorMessage". It would be nice if I could tell the library to look for the message in the "error" property instead.
What about having this library use errorMessage when present, otherwise using error if present? That way both would be supported without additional configuration?
What about having this library use
errorMessagewhen present, otherwise usingerrorif present? That way both would be supported without additional configuration?
That is a completely valid approach! Sounds like something that would work out of the (type)box for most users :D @jtlapp
Sorry, I wasn't able to get to it today. Feel free to provide a PR. Just be sure to include tests.