diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-04-16 19:52:06 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-04-26 21:22:51 +0200 |
commit | c689fcdca23e8693b6b6386fff779f9330f7f1c4 (patch) | |
tree | fbce6c0bd19ddde432a46529625a94246c022bc5 /client/src/app/shared/forms/form-validators/user.ts | |
parent | 16a31eb74177f2eefe9dbca010ea573d23373291 (diff) | |
download | PeerTube-c689fcdca23e8693b6b6386fff779f9330f7f1c4.tar.gz PeerTube-c689fcdca23e8693b6b6386fff779f9330f7f1c4.tar.zst PeerTube-c689fcdca23e8693b6b6386fff779f9330f7f1c4.zip |
Client: use builtin email validator
Diffstat (limited to 'client/src/app/shared/forms/form-validators/user.ts')
-rw-r--r-- | client/src/app/shared/forms/form-validators/user.ts | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/client/src/app/shared/forms/form-validators/user.ts b/client/src/app/shared/forms/form-validators/user.ts index 0ad0e2a4b..259d2b868 100644 --- a/client/src/app/shared/forms/form-validators/user.ts +++ b/client/src/app/shared/forms/form-validators/user.ts | |||
@@ -1,7 +1,5 @@ | |||
1 | import { Validators } from '@angular/forms'; | 1 | import { Validators } from '@angular/forms'; |
2 | 2 | ||
3 | import { validateEmail } from './email.validator'; | ||
4 | |||
5 | export const USER_USERNAME = { | 3 | export const USER_USERNAME = { |
6 | VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(20) ], | 4 | VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(20) ], |
7 | MESSAGES: { | 5 | MESSAGES: { |
@@ -11,7 +9,7 @@ export const USER_USERNAME = { | |||
11 | } | 9 | } |
12 | }; | 10 | }; |
13 | export const USER_EMAIL = { | 11 | export const USER_EMAIL = { |
14 | VALIDATORS: [ Validators.required, validateEmail ], | 12 | VALIDATORS: [ Validators.required, Validators.email ], |
15 | MESSAGES: { | 13 | MESSAGES: { |
16 | 'required': 'Email is required.', | 14 | 'required': 'Email is required.', |
17 | 'email': 'Email must be valid.', | 15 | 'email': 'Email must be valid.', |