]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/form-validators/instance-validators.ts
Increase theme compatibility
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / form-validators / instance-validators.ts
index a72e28ba0f2de2e7ac31169a2ed39db5ee053fd9..4b1f0d0481dd55c0cadfea90ff7ff5529e407a61 100644 (file)
@@ -2,10 +2,10 @@ import { Validators } from '@angular/forms'
 import { BuildFormValidator } from './form-validator.model'
 
 export const FROM_EMAIL_VALIDATOR: BuildFormValidator = {
-  VALIDATORS: [Validators.required, Validators.email],
+  VALIDATORS: [ Validators.required, Validators.email ],
   MESSAGES: {
-    'required': $localize`Email is required.`,
-    'email': $localize`Email must be valid.`
+    required: $localize`Email is required.`,
+    email: $localize`Email must be valid.`
   }
 }
 
@@ -16,9 +16,9 @@ export const FROM_NAME_VALIDATOR: BuildFormValidator = {
     Validators.maxLength(120)
   ],
   MESSAGES: {
-    'required': $localize`Your name is required.`,
-    'minlength': $localize`Your name must be at least 1 character long.`,
-    'maxlength': $localize`Your name cannot be more than 120 characters long.`
+    required: $localize`Your name is required.`,
+    minlength: $localize`Your name must be at least 1 character long.`,
+    maxlength: $localize`Your name cannot be more than 120 characters long.`
   }
 }
 
@@ -29,9 +29,9 @@ export const SUBJECT_VALIDATOR: BuildFormValidator = {
     Validators.maxLength(120)
   ],
   MESSAGES: {
-    'required': $localize`A subject is required.`,
-    'minlength': $localize`The subject must be at least 1 character long.`,
-    'maxlength': $localize`The subject cannot be more than 120 characters long.`
+    required: $localize`A subject is required.`,
+    minlength: $localize`The subject must be at least 1 character long.`,
+    maxlength: $localize`The subject cannot be more than 120 characters long.`
   }
 }
 
@@ -42,8 +42,8 @@ export const BODY_VALIDATOR: BuildFormValidator = {
     Validators.maxLength(5000)
   ],
   MESSAGES: {
-    'required': $localize`A message is required.`,
-    'minlength': $localize`The message must be at least 3 characters long.`,
-    'maxlength': $localize`The message cannot be more than 5000 characters long.`
+    required: $localize`A message is required.`,
+    minlength: $localize`The message must be at least 3 characters long.`,
+    maxlength: $localize`The message cannot be more than 5000 characters long.`
   }
 }