aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-04 18:32:38 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-04 18:32:38 +0100
commit563d032e97cc62de50281e6413a8a03ed37a3d3b (patch)
tree43f09cc746f8b3b92d9d7b078ae93d2af7c3b032 /client
parentf73544839586d5e50529617f3649a84ac9e0ab86 (diff)
downloadPeerTube-563d032e97cc62de50281e6413a8a03ed37a3d3b.tar.gz
PeerTube-563d032e97cc62de50281e6413a8a03ed37a3d3b.tar.zst
PeerTube-563d032e97cc62de50281e6413a8a03ed37a3d3b.zip
Usernames are case insensitive now
Diffstat (limited to 'client')
-rw-r--r--client/src/app/shared/forms/form-validators/user.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/client/src/app/shared/forms/form-validators/user.ts b/client/src/app/shared/forms/form-validators/user.ts
index 9d200649c..602576efa 100644
--- a/client/src/app/shared/forms/form-validators/user.ts
+++ b/client/src/app/shared/forms/form-validators/user.ts
@@ -1,11 +1,17 @@
1import { Validators } from '@angular/forms' 1import { Validators } from '@angular/forms'
2 2
3export const USER_USERNAME = { 3export const USER_USERNAME = {
4 VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(20) ], 4 VALIDATORS: [
5 Validators.required,
6 Validators.minLength(3),
7 Validators.maxLength(20),
8 Validators.pattern(/^[a-z0-9._]+$/)
9 ],
5 MESSAGES: { 10 MESSAGES: {
6 'required': 'Username is required.', 11 'required': 'Username is required.',
7 'minlength': 'Username must be at least 3 characters long.', 12 'minlength': 'Username must be at least 3 characters long.',
8 'maxlength': 'Username cannot be more than 20 characters long.' 13 'maxlength': 'Username cannot be more than 20 characters long.',
14 'pattern': 'Username should be only lowercase alphanumeric characters.'
9 } 15 }
10} 16}
11export const USER_EMAIL = { 17export const USER_EMAIL = {