From dce1d7957d6d843205030dbc4a712b79ec499b57 Mon Sep 17 00:00:00 2001 From: jomo Date: Fri, 23 Mar 2018 08:13:33 +0000 Subject: [PATCH] fix #382 generic error when password is too long (#383) --- client/src/app/shared/forms/form-validators/user.ts | 9 +++++++-- 1 file 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 = { } } export const USER_PASSWORD = { - VALIDATORS: [ Validators.required, Validators.minLength(6) ], + VALIDATORS: [ + Validators.required, + Validators.minLength(6), + Validators.maxLength(255) + ], MESSAGES: { 'required': 'Password is required.', - 'minlength': 'Password must be at least 6 characters long.' + 'minlength': 'Password must be at least 6 characters long.', + 'maxlength': 'Password cannot be more than 255 characters long.' } } export const USER_VIDEO_QUOTA = { -- 2.25.1