-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
"default" option is not being applied on validation #664
Comments
Workaround: Wrap it into optional and pass false as a second parameter |
@david-plugge it doesn't work, isSuperuser is ignored and never is assigned the default value. |
7d0e29b published on 1.0.23 including test case. Let me know if it works on your end. |
it is working as expected, thanks. |
Oh I think I'm relying on this bug for my app to work as intended. I'm not experienced with Typebox so when I saw that |
What version of Elysia.JS is running?
1.0.22
What platform is your computer?
Linux 6.9.2-arch1-1 x86_64 unknown
What steps can reproduce the bug?
then try to send a POST request with this body:
{
"username": "admin",
"password": "123456789",
"email": "admin@chesu.org"
}
What is the expected behavior?
body is accepted with default value applied to "isSuperuser" property
What do you see instead?
If I send this body:
{
"username": "admin",
"password": "123456789",
"email": "admin@chesu.org",
"isSuperuser": false
}
then it is accepted and processed.
Additional information
No response
The text was updated successfully, but these errors were encountered: