-
-
Notifications
You must be signed in to change notification settings - Fork 464
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Elysia is running?
elysia@1.4.21
What platform is your computer?
Darwin 25.2.0 arm64 arm
What environment are you using
Bun 1.3.5
Are you using dynamic mode?
No
What steps can reproduce the bug?
- Run the following code:
import { Elysia, t } from "elysia";
const app = new Elysia()
.get("/", ({ query }) => query, {
query: t.Object({
limit: t.Number({ minimum: 1, maximum: 100, default: 10 }),
}),
})
.listen(3000);What is the expected behavior?
The response should return a validation error containing something like:
What do you see instead?
The error response contains unexpected values for the on and property fields, for example:
{
"type": "validation",
"on": "property",
"property": "root",
// ...
}Additional information
When accessing
http://localhost:3000?limit=string
the validation error returns the correct on and property fields.
{
"type": "validation",
"on": "query",
"property": "/limit",
"message": "Expected union value",
// ...
}Have you try removing the node_modules and bun.lockb and try again yet?
yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
{ "type": "validation", "on": "query", "property": "/limit", // ... }