]>
Commit | Line | Data |
---|---|---|
9589907c C |
1 | import { Validators } from '@angular/forms' |
2 | import { BuildFormValidator } from '@app/shared/form-validators' | |
3 | ||
4 | export const REGISTER_TERMS_VALIDATOR: BuildFormValidator = { | |
5 | VALIDATORS: [ Validators.requiredTrue ], | |
6 | MESSAGES: { | |
7 | required: $localize`You must agree with the instance terms in order to register on it.` | |
8 | } | |
9 | } | |
10 | ||
11 | export const REGISTER_REASON_VALIDATOR: BuildFormValidator = { | |
12 | VALIDATORS: [ Validators.required, Validators.minLength(2), Validators.maxLength(3000) ], | |
13 | MESSAGES: { | |
14 | required: $localize`Registration reason is required.`, | |
15 | minlength: $localize`Registration reason must be at least 2 characters long.`, | |
16 | maxlength: $localize`Registration reason cannot be more than 3000 characters long.` | |
17 | } | |
18 | } |