-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Cannot get schema name when using modifier #64
Comments
Hey, can you share the purpose for which you are reading the |
@thetutlage The purpose is to dynamically populate a form with fields depending on the type. The goal is that we can reuse the Vine schema for this information (essentially, the Vine schema is the "source of truth"), instead of creating another object with the mappings. |
The So, for your use-case, you can use the const validator = vine.compile(
vine.object({
})
)
console.log(validator.toJSON()) |
Yeah. It will be nice to encode that info. Lemme do that |
May I make a request that it be exposed in both the compiled Thank you for looking at this, it's really only a minor thing in the grand scheme of things, but it does mean less technical maintenance for us, so it is greatly appreciated. |
Package version
2.1.0
Describe the bug
When using a modifier on a schema, e.g.,
.optional()
, you can no longer get the schema name.Example:
Reproduction repo
No response
The text was updated successfully, but these errors were encountered: