diff options
Diffstat (limited to 'client/src/app/shared/shared-forms/form-validators/reset-password-validators.service.ts')
-rw-r--r-- | client/src/app/shared/shared-forms/form-validators/reset-password-validators.service.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-forms/form-validators/reset-password-validators.service.ts b/client/src/app/shared/shared-forms/form-validators/reset-password-validators.service.ts new file mode 100644 index 000000000..d2085a309 --- /dev/null +++ b/client/src/app/shared/shared-forms/form-validators/reset-password-validators.service.ts | |||
@@ -0,0 +1,20 @@ | |||
1 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
2 | import { Validators } from '@angular/forms' | ||
3 | import { Injectable } from '@angular/core' | ||
4 | import { BuildFormValidator } from './form-validator.service' | ||
5 | |||
6 | @Injectable() | ||
7 | export class ResetPasswordValidatorsService { | ||
8 | readonly RESET_PASSWORD_CONFIRM: BuildFormValidator | ||
9 | |||
10 | constructor (private i18n: I18n) { | ||
11 | this.RESET_PASSWORD_CONFIRM = { | ||
12 | VALIDATORS: [ | ||
13 | Validators.required | ||
14 | ], | ||
15 | MESSAGES: { | ||
16 | 'required': this.i18n('Confirmation of the password is required.') | ||
17 | } | ||
18 | } | ||
19 | } | ||
20 | } | ||