]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/form-validators/video-playlist-validators.ts
Increase theme compatibility
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / form-validators / video-playlist-validators.ts
index 7e3d294586bbe7a6d4ec9b488e214e8d19337623..63af637a3712b38d3a80c0f6330c5adfa76edacd 100644 (file)
@@ -9,9 +9,9 @@ export const VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR: BuildFormValidator = {
     Validators.maxLength(120)
   ],
   MESSAGES: {
-    'required': $localize`Display name is required.`,
-    'minlength': $localize`Display name must be at least 1 character long.`,
-    'maxlength': $localize`Display name cannot be more than 120 characters long.`
+    required: $localize`Display name is required.`,
+    minlength: $localize`Display name must be at least 1 character long.`,
+    maxlength: $localize`Display name cannot be more than 120 characters long.`
   }
 }
 
@@ -20,7 +20,7 @@ export const VIDEO_PLAYLIST_PRIVACY_VALIDATOR: BuildFormValidator = {
     Validators.required
   ],
   MESSAGES: {
-    'required': $localize`Privacy is required.`
+    required: $localize`Privacy is required.`
   }
 }
 
@@ -30,21 +30,21 @@ export const VIDEO_PLAYLIST_DESCRIPTION_VALIDATOR: BuildFormValidator = {
     Validators.maxLength(1000)
   ],
   MESSAGES: {
-    'minlength': $localize`Description must be at least 3 characters long.`,
-    'maxlength': $localize`Description cannot be more than 1000 characters long.`
+    minlength: $localize`Description must be at least 3 characters long.`,
+    maxlength: $localize`Description cannot be more than 1000 characters long.`
   }
 }
 
 export const VIDEO_PLAYLIST_CHANNEL_ID_VALIDATOR: BuildFormValidator = {
   VALIDATORS: [],
   MESSAGES: {
-    'required': $localize`The channel is required when the playlist is public.`
+    required: $localize`The channel is required when the playlist is public.`
   }
 }
 
 export function setPlaylistChannelValidator (channelControl: AbstractControl, privacy: VideoPlaylistPrivacy) {
   if (privacy.toString() === VideoPlaylistPrivacy.PUBLIC.toString()) {
-    channelControl.setValidators([Validators.required])
+    channelControl.setValidators([ Validators.required ])
   } else {
     channelControl.setValidators(null)
   }