diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-17 14:42:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-18 08:35:06 +0200 |
commit | 9df52d660feb722404be00a50f3c8a612bec1c15 (patch) | |
tree | dde52880fa012874d24c60f64eb596b0a789cc8b /client/src/app/shared/form-validators/instance-validators.ts | |
parent | adb8809d43648ea0a64d6845bb39aa3bd0e005a6 (diff) | |
download | PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.tar.gz PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.tar.zst PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.zip |
Migrate client to eslint
Diffstat (limited to 'client/src/app/shared/form-validators/instance-validators.ts')
-rw-r--r-- | client/src/app/shared/form-validators/instance-validators.ts | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/client/src/app/shared/form-validators/instance-validators.ts b/client/src/app/shared/form-validators/instance-validators.ts index a72e28ba0..4b1f0d048 100644 --- a/client/src/app/shared/form-validators/instance-validators.ts +++ b/client/src/app/shared/form-validators/instance-validators.ts | |||
@@ -2,10 +2,10 @@ import { Validators } from '@angular/forms' | |||
2 | import { BuildFormValidator } from './form-validator.model' | 2 | import { BuildFormValidator } from './form-validator.model' |
3 | 3 | ||
4 | export const FROM_EMAIL_VALIDATOR: BuildFormValidator = { | 4 | export const FROM_EMAIL_VALIDATOR: BuildFormValidator = { |
5 | VALIDATORS: [Validators.required, Validators.email], | 5 | VALIDATORS: [ Validators.required, Validators.email ], |
6 | MESSAGES: { | 6 | MESSAGES: { |
7 | 'required': $localize`Email is required.`, | 7 | required: $localize`Email is required.`, |
8 | 'email': $localize`Email must be valid.` | 8 | email: $localize`Email must be valid.` |
9 | } | 9 | } |
10 | } | 10 | } |
11 | 11 | ||
@@ -16,9 +16,9 @@ export const FROM_NAME_VALIDATOR: BuildFormValidator = { | |||
16 | Validators.maxLength(120) | 16 | Validators.maxLength(120) |
17 | ], | 17 | ], |
18 | MESSAGES: { | 18 | MESSAGES: { |
19 | 'required': $localize`Your name is required.`, | 19 | required: $localize`Your name is required.`, |
20 | 'minlength': $localize`Your name must be at least 1 character long.`, | 20 | minlength: $localize`Your name must be at least 1 character long.`, |
21 | 'maxlength': $localize`Your name cannot be more than 120 characters long.` | 21 | maxlength: $localize`Your name cannot be more than 120 characters long.` |
22 | } | 22 | } |
23 | } | 23 | } |
24 | 24 | ||
@@ -29,9 +29,9 @@ export const SUBJECT_VALIDATOR: BuildFormValidator = { | |||
29 | Validators.maxLength(120) | 29 | Validators.maxLength(120) |
30 | ], | 30 | ], |
31 | MESSAGES: { | 31 | MESSAGES: { |
32 | 'required': $localize`A subject is required.`, | 32 | required: $localize`A subject is required.`, |
33 | 'minlength': $localize`The subject must be at least 1 character long.`, | 33 | minlength: $localize`The subject must be at least 1 character long.`, |
34 | 'maxlength': $localize`The subject cannot be more than 120 characters long.` | 34 | maxlength: $localize`The subject cannot be more than 120 characters long.` |
35 | } | 35 | } |
36 | } | 36 | } |
37 | 37 | ||
@@ -42,8 +42,8 @@ export const BODY_VALIDATOR: BuildFormValidator = { | |||
42 | Validators.maxLength(5000) | 42 | Validators.maxLength(5000) |
43 | ], | 43 | ], |
44 | MESSAGES: { | 44 | MESSAGES: { |
45 | 'required': $localize`A message is required.`, | 45 | required: $localize`A message is required.`, |
46 | 'minlength': $localize`The message must be at least 3 characters long.`, | 46 | minlength: $localize`The message must be at least 3 characters long.`, |
47 | 'maxlength': $localize`The message cannot be more than 5000 characters long.` | 47 | maxlength: $localize`The message cannot be more than 5000 characters long.` |
48 | } | 48 | } |
49 | } | 49 | } |