]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/forms/form-validators/user.ts
Remove ng2 file upload module
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / forms / form-validators / user.ts
index 5b11ff265cb195e8c6cf3a08713f24b3da092636..d4c4c1d33a905f0d8e07d90e49d64836f4aeb5e9 100644 (file)
@@ -1,4 +1,4 @@
-import { Validators } from '@angular/forms';
+import { Validators } from '@angular/forms'
 
 export const USER_USERNAME = {
   VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(20) ],
@@ -7,11 +7,25 @@ export const USER_USERNAME = {
     'minlength': 'Username must be at least 3 characters long.',
     'maxlength': 'Username cannot be more than 20 characters long.'
   }
-};
+}
+export const USER_EMAIL = {
+  VALIDATORS: [ Validators.required, Validators.email ],
+  MESSAGES: {
+    'required': 'Email is required.',
+    'email': 'Email must be valid.'
+  }
+}
 export const USER_PASSWORD = {
   VALIDATORS: [ Validators.required, Validators.minLength(6) ],
   MESSAGES: {
     'required': 'Password is required.',
-    'minlength': 'Password must be at least 6 characters long.',
+    'minlength': 'Password must be at least 6 characters long.'
+  }
+}
+export const USER_VIDEO_QUOTA = {
+  VALIDATORS: [ Validators.required, Validators.min(-1) ],
+  MESSAGES: {
+    'required': 'Video quota is required.',
+    'min': 'Quota must be greater than -1.'
   }
-};
+}