email can't be null, username removed since email can't be null

This commit is contained in:
jackiettran committed 2025-11-24 15:41:35 -05:00
1 parent 6aac929ec1
commit 532f3014df
6 files changed
+59 -85

No files matched your search

-10
View File
@@ -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()