diff options
author | jomo <github@jomo.tv> | 2018-03-23 08:13:33 +0000 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-03-23 09:13:33 +0100 |
commit | dce1d7957d6d843205030dbc4a712b79ec499b57 (patch) | |
tree | d43ade76d4604dd54e3fb08c9e3ffa38f63bd4a1 | |
parent | 8e8234abba7b64767e9ffb6dc38758a62b1ea16c (diff) | |
download | PeerTube-dce1d7957d6d843205030dbc4a712b79ec499b57.tar.gz PeerTube-dce1d7957d6d843205030dbc4a712b79ec499b57.tar.zst PeerTube-dce1d7957d6d843205030dbc4a712b79ec499b57.zip |
fix #382 generic error when password is too long (#383)
-rw-r--r-- | client/src/app/shared/forms/form-validators/user.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/client/src/app/shared/forms/form-validators/user.ts b/client/src/app/shared/forms/form-validators/user.ts index 602576efa..d2a28a272 100644 --- a/client/src/app/shared/forms/form-validators/user.ts +++ b/client/src/app/shared/forms/form-validators/user.ts | |||
@@ -22,10 +22,15 @@ export const USER_EMAIL = { | |||
22 | } | 22 | } |
23 | } | 23 | } |
24 | export const USER_PASSWORD = { | 24 | export const USER_PASSWORD = { |
25 | VALIDATORS: [ Validators.required, Validators.minLength(6) ], | 25 | VALIDATORS: [ |
26 | Validators.required, | ||
27 | Validators.minLength(6), | ||
28 | Validators.maxLength(255) | ||
29 | ], | ||
26 | MESSAGES: { | 30 | MESSAGES: { |
27 | 'required': 'Password is required.', | 31 | 'required': 'Password is required.', |
28 | 'minlength': 'Password must be at least 6 characters long.' | 32 | 'minlength': 'Password must be at least 6 characters long.', |
33 | 'maxlength': 'Password cannot be more than 255 characters long.' | ||
29 | } | 34 | } |
30 | } | 35 | } |
31 | export const USER_VIDEO_QUOTA = { | 36 | export const USER_VIDEO_QUOTA = { |