diff options
author | Chocobozzz <me@florianbigard.com> | 2021-01-14 14:13:23 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-01-15 10:49:10 +0100 |
commit | d43c6b1ffc5e6c895f9e9f9de6625f17a9755c20 (patch) | |
tree | 6bdcbe9893574e0b5a41c4854c7f986f346ba761 /client/src/app/shared/form-validators/user-validators.ts | |
parent | b0a9743af0273835cdf594431a774c0f7d46b539 (diff) | |
download | PeerTube-d43c6b1ffc5e6c895f9e9f9de6625f17a9755c20.tar.gz PeerTube-d43c6b1ffc5e6c895f9e9f9de6625f17a9755c20.tar.zst PeerTube-d43c6b1ffc5e6c895f9e9f9de6625f17a9755c20.zip |
Implement remote interaction
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 |