You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{Elysia,t}from"elysia";constapp=newElysia().get("/",({cookie: { hello }})=>{console.log(`The value of the "hello" cookie is ${hello.value} and it is of type ${typeofhello.value}`);return"Hello Elysia";},{cookie: t.Cookie({hello: t.String()})}).listen(8080);console.log(`${app.server!.url}`);
What is the expected behavior?
No response
What do you see instead?
Doesn't throw an ValidationError when the hello cookie does not exist
If I set the hello cookie equal to the string 123, it gets parsed as a number even though I explicitly stated it's of type string
What version of Elysia.JS is running?
1.0.20
What platform is your computer?
No response
What steps can reproduce the bug?
What is the expected behavior?
No response
What do you see instead?
ValidationError
when thehello
cookie does not existhello
cookie equal to the string123
, it gets parsed as a number even though I explicitly stated it's of type stringAdditional information
Reported on discord
works as expected if you configure:
The text was updated successfully, but these errors were encountered: