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
Now, I would like to create another schema to validate only part of mySchema. For that reason I can create another schema and pick only a few validators from mySchema, potentially like this:
constanotherSchema=object({name: mySchema.name})
But the object's validator shape is not available after the validator is built. I took a look at the code and this is potentially possible but the types in refine function are too complex for me at the moment :)
The text was updated successfully, but these errors were encountered:
Since the mySchema from darkowic's example is function, which is an object in JS, we can add a new namespace property like schema that will store all the validators from the original one. It will look like this:
Consider following schema
Now, I would like to create another schema to validate only part of
mySchema
. For that reason I can create another schema and pick only a few validators frommySchema
, potentially like this:But the object's validator shape is not available after the validator is built. I took a look at the code and this is potentially possible but the types in
refine
function are too complex for me at the moment :)The text was updated successfully, but these errors were encountered: