]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/forms/form-validators/reset-password-validators.service.ts
Add form validator translations
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / forms / form-validators / reset-password-validators.service.ts
CommitLineData
e309822b
C
1import { I18n } from '@ngx-translate/i18n-polyfill'
2import { Validators } from '@angular/forms'
3import { Injectable } from '@angular/core'
4import { BuildFormValidator } from '@app/shared'
5
6@Injectable()
7export 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}