We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
const OptionalStringSchema = v.object({ cake: v.optional(v.string(), "Chocolate!"), }) const defaultValue = v.getDefault(OptionalStringSchema) console.info(defaultValue) // undefined
Its even typed undefined. Is this something not implemented yet?
It works with the primitives tho
v.getDefault(OptionalStringSchema.entries.cake) // Chocolate
Versions
"valibot": "^0.42.1", "typescript": "~5.6.3",
The text was updated successfully, but these errors were encountered:
Please have a look at getDefaults: https://valibot.dev/api/getDefaults/
getDefaults
Sorry, something went wrong.
Silly me just ignoring the letter s. Ty ^^
s
fabian-hiller
No branches or pull requests
Its even typed undefined. Is this something not implemented yet?
It works with the primitives tho
Versions
The text was updated successfully, but these errors were encountered: