diff options
Diffstat (limited to 'client/src/app/shared/form-validators/user-validators.ts')
-rw-r--r-- | client/src/app/shared/form-validators/user-validators.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/client/src/app/shared/form-validators/user-validators.ts b/client/src/app/shared/form-validators/user-validators.ts index a27290035..3f462ca3b 100644 --- a/client/src/app/shared/form-validators/user-validators.ts +++ b/client/src/app/shared/form-validators/user-validators.ts | |||
@@ -39,6 +39,17 @@ export const USER_EMAIL_VALIDATOR: BuildFormValidator = { | |||
39 | } | 39 | } |
40 | } | 40 | } |
41 | 41 | ||
42 | export const USER_HANDLE_VALIDATOR: BuildFormValidator = { | ||
43 | VALIDATORS: [ | ||
44 | Validators.required, | ||
45 | Validators.pattern(/@.+/) | ||
46 | ], | ||
47 | MESSAGES: { | ||
48 | 'required': $localize`Handle is required.`, | ||
49 | 'pattern': $localize`Handle must be valid (chocobozzz@example.com).` | ||
50 | } | ||
51 | } | ||
52 | |||
42 | export const USER_EXISTING_PASSWORD_VALIDATOR: BuildFormValidator = { | 53 | export const USER_EXISTING_PASSWORD_VALIDATOR: BuildFormValidator = { |
43 | VALIDATORS: [ | 54 | VALIDATORS: [ |
44 | Validators.required | 55 | Validators.required |