Update login.js
This commit is contained in:
parent
86349bcf4f
commit
0e0f176e50
@ -2,16 +2,16 @@ const z = require("zod")
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
POST: {
|
POST: {
|
||||||
headers: {
|
headers: z.object({
|
||||||
"content-type": z.string().regex(/application\/json/i)
|
"content-type": z.string().regex(/application\/json/i),
|
||||||
},
|
}),
|
||||||
body: {
|
body: z.object({
|
||||||
username: z.string()
|
username: z.string()
|
||||||
.min(1),
|
.min(1),
|
||||||
password: z.string()
|
password: z.string()
|
||||||
.min(8, { message: "The password must be at least 8 characters long." })
|
.min(8, { message: "The password must be at least 8 characters long." })
|
||||||
.regex(/[A-Z]/, { message: "The password must contain a capital letter." })
|
.regex(/[A-Z]/, { message: "The password must contain a capital letter." })
|
||||||
.regex(/[0-9]/, { message: "The password must contain a number." })
|
.regex(/[0-9]/, { message: "The password must contain a number." })
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user