]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - 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
CommitLineData
df98563e 1import { Validators } from '@angular/forms'
4b2f33f3
C
2
3export const USER_USERNAME = {
4 VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(20) ],
5 MESSAGES: {
6 'required': 'Username is required.',
7 'minlength': 'Username must be at least 3 characters long.',
8 'maxlength': 'Username cannot be more than 20 characters long.'
9 }
df98563e 10}
ad4a8a1c 11export const USER_EMAIL = {
c689fcdc 12 VALIDATORS: [ Validators.required, Validators.email ],
ad4a8a1c
C
13 MESSAGES: {
14 'required': 'Email is required.',
df98563e 15 'email': 'Email must be valid.'
ad4a8a1c 16 }
df98563e 17}
4b2f33f3
C
18export const USER_PASSWORD = {
19 VALIDATORS: [ Validators.required, Validators.minLength(6) ],
20 MESSAGES: {
21 'required': 'Password is required.',
df98563e 22 'minlength': 'Password must be at least 6 characters long.'
4b2f33f3 23 }
df98563e 24}
b0f9f39e
C
25export const USER_VIDEO_QUOTA = {
26 VALIDATORS: [ Validators.required, Validators.min(-1) ],
27 MESSAGES: {
28 'required': 'Video quota is required.',
29 'min': 'Quota must be greater than -1.'
30 }
980246ea 31}