Validation objects could be more useful #675
dominictobias
started this conversation in
Ideas
Replies: 1 comment
-
as far i know you have to reMap them onError anyway in production validations errors are empty |
Beta Was this translation helpful? Give feedback.
0 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
At the moment if I don't return an expected
response
that I've typed, Elysia has the following error object:For large objects it takes me ages to manually check every field of often an array of objects from an external server to see what I've typed too strictly. As far as I can tell this error object has nothing useful like "Expected 'lastPrice' to be a number". It just has the validation schema and the values.
It would be great if there was also a message like
messages: ["'subtitle' is required", "'page_number' must be numeric"]
. This could also form better UI messages.Beta Was this translation helpful? Give feedback.
All reactions