email can't be null, username removed since email can't be null
This commit is contained in:
1 parent
6aac929ec1
commit
532f3014df
6 files changed
+59
-85
No files matched your search
@@ -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