aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-forms/form-validators/reset-password-validators.service.ts
blob: d2085a309e90968b0243d82517063608049d5063 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { I18n } from '@ngx-translate/i18n-polyfill'
import { Validators } from '@angular/forms'
import { Injectable } from '@angular/core'
import { BuildFormValidator } from './form-validator.service'

@Injectable()
export class ResetPasswordValidatorsService {
  readonly RESET_PASSWORD_CONFIRM: BuildFormValidator

  constructor (private i18n: I18n) {
    this.RESET_PASSWORD_CONFIRM = {
      VALIDATORS: [
        Validators.required
      ],
      MESSAGES: {
        'required': this.i18n('Confirmation of the password is required.')
      }
    }
  }
}