]>
Commit | Line | Data |
---|---|---|
e309822b | 1 | import { Injectable } from '@angular/core' |
66357162 | 2 | import { Validators } from '@angular/forms' |
67ed6552 | 3 | import { BuildFormValidator } from './form-validator.service' |
e309822b C |
4 | |
5 | @Injectable() | |
6 | export class LoginValidatorsService { | |
7 | readonly LOGIN_USERNAME: BuildFormValidator | |
8 | readonly LOGIN_PASSWORD: BuildFormValidator | |
9 | ||
66357162 | 10 | constructor () { |
e309822b C |
11 | this.LOGIN_USERNAME = { |
12 | VALIDATORS: [ | |
13 | Validators.required | |
14 | ], | |
15 | MESSAGES: { | |
66357162 | 16 | 'required': $localize`Username is required.` |
e309822b C |
17 | } |
18 | } | |
19 | ||
20 | this.LOGIN_PASSWORD = { | |
21 | VALIDATORS: [ | |
22 | Validators.required | |
23 | ], | |
24 | MESSAGES: { | |
66357162 | 25 | 'required': $localize`Password is required.` |
e309822b C |
26 | } |
27 | } | |
28 | } | |
29 | } |