talyssonoc / structure

A simple schema/attributes library built on top of modern JavaScript
https://structure.js.org/
MIT License
301 stars 20 forks source link

Add joi validation type to error details #131

Closed mertcanyalhi closed 7 months ago

mertcanyalhi commented 4 years ago

The aim of this PR is to include the type parameter from the joi error detail, which will be handy while localizing the error messages.

talyssonoc commented 4 years ago

@mertcanyalhi thanks, I like this idea! Might be good to update the docs about validation as well and update more validation tests so we have documented in the code what's the value of type for each validation we support.

Also, do you think we could add some matchers to jest-structure as well? It doesn't need to be in this same PR