aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app')
-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 = {