I created a standalone nodejs application to check validations in different libraries. I use joi and zod at the same time to see the differences.
import z from "zod"
import Joi from "joi"
// Here are my test mails
const mailMatrix = ["()@gmail.com", "{}@gmail.com", "%@gmail.com"]
const joiSchema = Joi.object({
email: Joi.string().email(),
})
const zodSchema = z.object({
email: z.string().email(),
})
Runtime
nodejs
Runtime version
18.19.1
Module version
17.12.2
Used with
standalone, typescript
Any other relevant information
No response
How can we help?
An email including curly brackets really allowed?
I created a standalone nodejs application to check validations in different libraries. I use joi and zod at the same time to see the differences.
Here are my validate functions to joi and zod.
When i want to see are them valid or not with this map
Results: true -> valid false -> invalid
How is it possible for someone to have a curly brackets email or percent sign. Is it a bug or something like that?