diff options
Diffstat (limited to 'server/middlewares/validators/users.ts')
-rw-r--r-- | server/middlewares/validators/users.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 5d52b5804..adc67a046 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts | |||
@@ -14,6 +14,7 @@ import { | |||
14 | isUserDisplayNameValid, | 14 | isUserDisplayNameValid, |
15 | isUserNSFWPolicyValid, | 15 | isUserNSFWPolicyValid, |
16 | isUserPasswordValid, | 16 | isUserPasswordValid, |
17 | isUserPasswordValidOrEmpty, | ||
17 | isUserRoleValid, | 18 | isUserRoleValid, |
18 | isUserUsernameValid, | 19 | isUserUsernameValid, |
19 | isUserVideoLanguages, | 20 | isUserVideoLanguages, |
@@ -39,7 +40,7 @@ import { Hooks } from '@server/lib/plugins/hooks' | |||
39 | 40 | ||
40 | const usersAddValidator = [ | 41 | const usersAddValidator = [ |
41 | body('username').custom(isUserUsernameValid).withMessage('Should have a valid username (lowercase alphanumeric characters)'), | 42 | body('username').custom(isUserUsernameValid).withMessage('Should have a valid username (lowercase alphanumeric characters)'), |
42 | body('password').custom(isUserPasswordValid).withMessage('Should have a valid password'), | 43 | body('password').custom(isUserPasswordValidOrEmpty).withMessage('Should have a valid password'), |
43 | body('email').isEmail().withMessage('Should have a valid email'), | 44 | body('email').isEmail().withMessage('Should have a valid email'), |
44 | body('videoQuota').custom(isUserVideoQuotaValid).withMessage('Should have a valid user quota'), | 45 | body('videoQuota').custom(isUserVideoQuotaValid).withMessage('Should have a valid user quota'), |
45 | body('videoQuotaDaily').custom(isUserVideoQuotaDailyValid).withMessage('Should have a valid daily user quota'), | 46 | body('videoQuotaDaily').custom(isUserVideoQuotaDailyValid).withMessage('Should have a valid daily user quota'), |