import { Component, OnInit } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { Notifier, UserService } from '@app/core'
-import { FormReactive, FormValidatorService, ResetPasswordValidatorsService, UserValidatorsService } from '@app/shared/shared-forms'
+import { RESET_PASSWORD_CONFIRM_VALIDATOR } from '@app/shared/form-validators/reset-password-validators'
+import { USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators'
+import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
@Component({
selector: 'my-login',
constructor (
protected formValidatorService: FormValidatorService,
- private resetPasswordValidatorsService: ResetPasswordValidatorsService,
- private userValidatorsService: UserValidatorsService,
private userService: UserService,
private notifier: Notifier,
private router: Router,
ngOnInit () {
this.buildForm({
- password: this.userValidatorsService.USER_PASSWORD,
- 'password-confirm': this.resetPasswordValidatorsService.RESET_PASSWORD_CONFIRM
+ password: USER_PASSWORD_VALIDATOR,
+ 'password-confirm': RESET_PASSWORD_CONFIRM_VALIDATOR
})
this.userId = this.route.snapshot.queryParams['userId']