Closed Deviad closed 4 years ago
I cannot get the error messages straight in a message field. Therefore I created this function to extract the error messages from "constraints" array.
I appreciate your PR although I think it should be posted against the main class-validator
repository, not this one as it's only a simple plugin, a wrapper around that two libraries.
Your use case is also really specific so maybe you should make it a separate npm package so all koa users could use that.
So I had to close this one 🔒
At least in Koa, I cannot get the error messages straight in a message field. Therefore I created this function to extract the error messages from "constraints" array.
Here is a repl.it: https://repl.it/@Deviad/AppendError#index.js The object in the repl is what I get inside err within catch(err){} when using koa.