]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/forms/form-validators/video.ts
Relax on tags (accept any characters and not required anymore)
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / forms / form-validators / video.ts
index 3766d4018b4df670a4a2541139c41836b03a9d66..de5112238083910a9dc8dc6a046bc386e213597c 100644 (file)
@@ -8,6 +8,12 @@ export const VIDEO_NAME = {
     '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_DESCRIPTION = {
   VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(250) ],
   MESSAGES: {
@@ -18,8 +24,8 @@ export const VIDEO_DESCRIPTION = {
 };
 
 export const VIDEO_TAGS = {
-  VALIDATORS: [ Validators.pattern('^[a-zA-Z0-9]{2,10}$') ],
+  VALIDATORS: [ Validators.maxLength(10) ],
   MESSAGES: {
-    'pattern': 'A tag should be between 2 and 10 alphanumeric characters long.'
+    'maxlength': 'A tag should be less than 10 characters long.'
   }
 };