email can't be null, username removed since email can't be null
This commit is contained in:
@@ -110,16 +110,6 @@ const validateRegistration = [
|
||||
"Last name can only contain letters, spaces, hyphens, and apostrophes"
|
||||
),
|
||||
|
||||
body("username")
|
||||
.optional()
|
||||
.trim()
|
||||
.isLength({ min: 3, max: 30 })
|
||||
.withMessage("Username must be between 3 and 30 characters")
|
||||
.matches(/^[a-zA-Z0-9_-]+$/)
|
||||
.withMessage(
|
||||
"Username can only contain letters, numbers, underscores, and hyphens"
|
||||
),
|
||||
|
||||
body("phone")
|
||||
.optional()
|
||||
.isMobilePhone()
|
||||
|
||||
Reference in New Issue
Block a user