Browse Source

refactor: set password fields max limit to 128

#2590
pull/2610/head
mehmet-erim 7 years ago
parent
commit
b5038cfad8
  1. 4
      npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts
  2. 2
      npm/ng-packs/packages/account/src/lib/components/login/login.component.ts
  3. 2
      npm/ng-packs/packages/account/src/lib/components/register/register.component.ts
  4. 2
      npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts

4
npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts

@ -72,7 +72,7 @@ export class ChangePasswordComponent
required, required,
validatePassword(passwordRulesArr), validatePassword(passwordRulesArr),
minLength(requiredLength), minLength(requiredLength),
maxLength(32), maxLength(128),
], ],
}, },
], ],
@ -83,7 +83,7 @@ export class ChangePasswordComponent
required, required,
validatePassword(passwordRulesArr), validatePassword(passwordRulesArr),
minLength(requiredLength), minLength(requiredLength),
maxLength(32), maxLength(128),
], ],
}, },
], ],

2
npm/ng-packs/packages/account/src/lib/components/login/login.component.ts

@ -34,7 +34,7 @@ export class LoginComponent {
this.form = this.fb.group({ this.form = this.fb.group({
username: ['', [required, maxLength(255)]], username: ['', [required, maxLength(255)]],
password: ['', [required, maxLength(32)]], password: ['', [required, maxLength(128)]],
remember: [false], remember: [false],
}); });
} }

2
npm/ng-packs/packages/account/src/lib/components/register/register.component.ts

@ -67,7 +67,7 @@ export class RegisterComponent implements OnInit {
username: ['', [required, maxLength(255)]], username: ['', [required, maxLength(255)]],
password: [ password: [
'', '',
[required, validatePassword(passwordRulesArr), minLength(requiredLength), maxLength(32)], [required, validatePassword(passwordRulesArr), minLength(requiredLength), maxLength(128)],
], ],
email: ['', [required, email]], email: ['', [required, email]],
}); });

2
npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts

@ -144,7 +144,7 @@ export class UsersComponent implements OnInit {
const passwordValidators = [ const passwordValidators = [
validatePassword(this.passwordRulesArr), validatePassword(this.passwordRulesArr),
Validators.minLength(this.requiredPasswordLength), Validators.minLength(this.requiredPasswordLength),
Validators.maxLength(32), Validators.maxLength(128),
]; ];
this.form.addControl('password', new FormControl('', [...passwordValidators])); this.form.addControl('password', new FormControl('', [...passwordValidators]));

Loading…
Cancel
Save