-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose object's schema shape #66
Comments
Hi @darkowic @mmiszy! Since the const anotherSchema = object({
name: mySchema.schema.name
}) I don't think we can just store the validators as first lever properties, because it might cause some naming collisions. For example: const schema = object({
length: number(),
name: string()
}) In this case the resulting Let me know what you think! :) |
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: