We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7c79c9 commit f935792Copy full SHA for f935792
middlewares/validators/user.js
@@ -16,7 +16,7 @@ const updateUser = async (req, res, next) => {
16
username: joi
17
.string()
18
.optional()
19
- .regex(/^[a-z0-9-]+$/)
+ .regex(/^[a-z]+-[a-z]+(-[1-9])?$/)
20
.message("Username must be lowercase only hypen, numbers are allowed."),
21
first_name: joi.string().optional(),
22
last_name: joi.string().optional(),
0 commit comments