getSchemaValidator doesn't apply default values during parsing #1530
Unanswered
DanielSuhett
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm using
getSchemaValidatorwith a schema that includes default values, but the defaults aren't being applied when parsingprocess.env.I've tested both default syntaxes:
t.String({ default: "value" })(current approach)t.String().default("value")(also tried this)Both syntaxes work without errors, but neither applies the default values during parsing.
What's the recommended pattern for variable validation with defaults in Elysia?
Beta Was this translation helpful? Give feedback.
All reactions