From 08becb31dc892de56360d937939634717f412ddf Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Tue, 21 Jan 2020 20:56:44 +0300 Subject: [PATCH] fix: fix require non alpha numeric validation --- .../components/change-password/change-password.component.ts | 4 +++- .../account/src/lib/components/register/register.component.ts | 4 +++- .../identity/src/lib/components/users/users.component.ts | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts b/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts index e9125de3c3..87169a2c1f 100644 --- a/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts +++ b/npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts @@ -54,7 +54,9 @@ export class ChangePasswordComponent passwordRulesArr.push('capital'); } - if (+(passwordRules['Abp.Identity.Password.RequiredUniqueChars'] || 0) > 0) { + if ( + (passwordRules['Abp.Identity.Password.RequireNonAlphanumeric'] || '').toLowerCase() === 'true' + ) { passwordRulesArr.push('special'); } diff --git a/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts b/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts index a76de66626..6785fc67fd 100644 --- a/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts +++ b/npm/ng-packs/packages/account/src/lib/components/register/register.component.ts @@ -71,7 +71,9 @@ export class RegisterComponent implements OnInit { passwordRulesArr.push('capital'); } - if (+(passwordRules['Abp.Identity.Password.RequiredUniqueChars'] || 0) > 0) { + if ( + (passwordRules['Abp.Identity.Password.RequireNonAlphanumeric'] || '').toLowerCase() === 'true' + ) { passwordRulesArr.push('special'); } diff --git a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts index 127cf15735..47ef7cca23 100644 --- a/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts +++ b/npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts @@ -102,7 +102,9 @@ export class UsersComponent implements OnInit { this.passwordRulesArr.push('capital'); } - if (+(passwordRules['Abp.Identity.Password.RequiredUniqueChars'] || 0) > 0) { + if ( + (passwordRules['Abp.Identity.Password.RequireNonAlphanumeric'] || '').toLowerCase() === 'true' + ) { this.passwordRulesArr.push('special'); }