diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-17 11:47:04 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-08-17 15:12:55 +0200 |
commit | 7ed1edbbe4ffbef28093e4f5630751cb652814e4 (patch) | |
tree | 831862165dbfce593447a517c2294a7a4c28d840 /client/src/app/shared/form-validators/login-validators.ts | |
parent | 1a95f0b9627f8016767a5a386620cbc3335d5f93 (diff) | |
download | PeerTube-7ed1edbbe4ffbef28093e4f5630751cb652814e4.tar.gz PeerTube-7ed1edbbe4ffbef28093e4f5630751cb652814e4.tar.zst PeerTube-7ed1edbbe4ffbef28093e4f5630751cb652814e4.zip |
We don't need services anymore for validators
Diffstat (limited to 'client/src/app/shared/form-validators/login-validators.ts')
-rw-r--r-- | client/src/app/shared/form-validators/login-validators.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/client/src/app/shared/form-validators/login-validators.ts b/client/src/app/shared/form-validators/login-validators.ts new file mode 100644 index 000000000..1ceae1be3 --- /dev/null +++ b/client/src/app/shared/form-validators/login-validators.ts | |||
@@ -0,0 +1,20 @@ | |||
1 | import { Validators } from '@angular/forms' | ||
2 | import { BuildFormValidator } from './form-validator.model' | ||
3 | |||
4 | export const LOGIN_USERNAME_VALIDATOR: BuildFormValidator = { | ||
5 | VALIDATORS: [ | ||
6 | Validators.required | ||
7 | ], | ||
8 | MESSAGES: { | ||
9 | 'required': $localize`Username is required.` | ||
10 | } | ||
11 | } | ||
12 | |||
13 | export const LOGIN_PASSWORD_VALIDATOR: BuildFormValidator = { | ||
14 | VALIDATORS: [ | ||
15 | Validators.required | ||
16 | ], | ||
17 | MESSAGES: { | ||
18 | 'required': $localize`Password is required.` | ||
19 | } | ||
20 | } | ||