diff options
Diffstat (limited to 'client/src/app/shared')
-rw-r--r-- | client/src/app/shared/form-validators/custom-config-validators.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/client/src/app/shared/form-validators/custom-config-validators.ts b/client/src/app/shared/form-validators/custom-config-validators.ts index ef6e9b456..1ed5700ff 100644 --- a/client/src/app/shared/form-validators/custom-config-validators.ts +++ b/client/src/app/shared/form-validators/custom-config-validators.ts | |||
@@ -49,6 +49,15 @@ export const SIGNUP_LIMIT_VALIDATOR: BuildFormValidator = { | |||
49 | } | 49 | } |
50 | } | 50 | } |
51 | 51 | ||
52 | export const SIGNUP_MINIMUM_AGE_VALIDATOR: BuildFormValidator = { | ||
53 | VALIDATORS: [Validators.required, Validators.min(1), Validators.pattern('[0-9]+')], | ||
54 | MESSAGES: { | ||
55 | 'required': $localize`Signup minimum age is required.`, | ||
56 | 'min': $localize`Signup minimum age must be greater than 1.`, | ||
57 | 'pattern': $localize`Signup minimum age must be a number.` | ||
58 | } | ||
59 | } | ||
60 | |||
52 | export const ADMIN_EMAIL_VALIDATOR: BuildFormValidator = { | 61 | export const ADMIN_EMAIL_VALIDATOR: BuildFormValidator = { |
53 | VALIDATORS: [Validators.required, Validators.email], | 62 | VALIDATORS: [Validators.required, Validators.email], |
54 | MESSAGES: { | 63 | MESSAGES: { |