You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With deeply nested object .strict must be added on every .object to check all keys but is easy to forget that. Option should be on parse function to check all objects strict by default. Could disable that on a particular object with z.object().strict(false). As example joi allows such option.
The text was updated successfully, but these errors were encountered:
I suggest something like parser = z.parser(options) to pass options like strictObjects: true so you have reusable parser object you can use all over project and use it like parser.parse(schema, object) or schema.parse(parser, object). Can such design work?
With deeply nested object
.strict
must be added on every.object
to check all keys but is easy to forget that. Option should be onparse
function to check all objects strict by default. Could disable that on a particular object withz.object().strict(false)
. As example joi allows such option.The text was updated successfully, but these errors were encountered: