}
}
+export const USER_HANDLE_VALIDATOR: BuildFormValidator = {
+ VALIDATORS: [
+ Validators.required,
+ Validators.pattern(/@.+/)
+ ],
+ MESSAGES: {
+ 'required': $localize`Handle is required.`,
+ 'pattern': $localize`Handle must be valid (eg. chocobozzz@example.com).`
+ }
+}
+
+export const USER_EXISTING_PASSWORD_VALIDATOR: BuildFormValidator = {
+ VALIDATORS: [
+ Validators.required
+ ],
+ MESSAGES: {
+ 'required': $localize`Password is required.`
+ }
+}
+
export const USER_PASSWORD_VALIDATOR: BuildFormValidator = {
VALIDATORS: [
Validators.required,
}
export const USER_TERMS_VALIDATOR: BuildFormValidator = {
- VALIDATORS: [
- Validators.requiredTrue
- ],
+ VALIDATORS: [ Validators.requiredTrue ],
MESSAGES: {
'required': $localize`You must agree with the instance terms in order to register on it.`
}