]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/forms/form-validators/video.ts
Add channels to upload form
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / forms / form-validators / video.ts
index f7e4e5e4b175829c875e22c11b096a43c79b2b41..213ab15db2caa82d0a70c2ab1d7b9d5eef73b979 100644 (file)
@@ -1,4 +1,4 @@
-import { Validators } from '@angular/forms';
+import { Validators } from '@angular/forms'
 
 export const VIDEO_NAME = {
   VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(50) ],
@@ -7,26 +7,33 @@ export const VIDEO_NAME = {
     'minlength': 'Video name must be at least 3 characters long.',
     'maxlength': 'Video name cannot be more than 50 characters long.'
   }
-};
+}
 
 export const VIDEO_CATEGORY = {
   VALIDATORS: [ Validators.required ],
   MESSAGES: {
     'required': 'Video category is required.'
   }
-};
+}
 
 export const VIDEO_LICENCE = {
   VALIDATORS: [ Validators.required ],
   MESSAGES: {
     'required': 'Video licence is required.'
   }
-};
+}
 
 export const VIDEO_LANGUAGE = {
   VALIDATORS: [ ],
   MESSAGES: {}
-};
+}
+
+export const VIDEO_CHANNEL = {
+  VALIDATORS: [ Validators.required ],
+  MESSAGES: {
+    'required': 'Video channel is required.'
+  }
+}
 
 export const VIDEO_DESCRIPTION = {
   VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(250) ],
@@ -35,7 +42,7 @@ export const VIDEO_DESCRIPTION = {
     'minlength': 'Video description must be at least 3 characters long.',
     'maxlength': 'Video description cannot be more than 250 characters long.'
   }
-};
+}
 
 export const VIDEO_TAGS = {
   VALIDATORS: [ Validators.minLength(2), Validators.maxLength(10) ],
@@ -43,4 +50,11 @@ export const VIDEO_TAGS = {
     'minlength': 'A tag should be more than 2 characters long.',
     'maxlength': 'A tag should be less than 10 characters long.'
   }
-};
+}
+
+export const VIDEO_FILE = {
+  VALIDATORS: [ Validators.required ],
+  MESSAGES: {
+    'required': 'Video file is required.'
+  }
+}