Skip to content

Commit a9e36a3

Browse files
authored
Fix 4
1 parent 1629dfc commit a9e36a3

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

src/modules/security.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -533,11 +533,12 @@
533533
patternLowerCaseChars = '^(?=(?:.*[a-z]){'+numRequiredLowercaseChars+',}).+',
534534
patternSpecialChars = '^(?=(?:.*(_|[!"#$%&\'()*+\\\\,-./:;<=>?@[\\]^_`{|}~])){'+numRequiredSpecialChars+',}).+',
535535
patternNumericChars = '^(?=(?:.*\\d){'+numRequiredNumericChars+',}).+',
536-
resultRegExpRequiredUppercaseChars = false,
537-
resultRegExpRequiredLowercaseChars = false,
538-
resultRegExpRequiredSpecialChars = false,
539-
resultRegExpRequiredNumericChars = false,
540-
error = false;
536+
resultRegExpRequiredUppercaseChars = true,
537+
resultRegExpRequiredLowercaseChars = true,
538+
resultRegExpRequiredSpecialChars = true,
539+
resultRegExpRequiredNumericChars = true,
540+
error = false,
541+
message_error = '';
541542

542543
if (numRequiredUppercaseChars !== '0'){
543544
resultRegExpRequiredUppercaseChars = new RegExp(patternUpperCaseChars).test(val);
@@ -554,36 +555,36 @@
554555

555556
if (!resultRegExpRequiredUppercaseChars){
556557
error = true;
557-
message_error = lang.passwordComplexityStart + numRequiredUppercaseChars + lang.passwordComplexityUppercaseInfo;
558+
message_error = $.formUtils.LANG.passwordComplexityStart + numRequiredUppercaseChars + $.formUtils.LANG.passwordComplexityUppercaseInfo;
558559
}
559560
if (!resultRegExpRequiredLowercaseChars){
560561
if (error){
561-
message_error = message_error + lang.passwordComplexitySeparator + numRequiredLowercaseChars + lang.passwordComplexityLowercaseInfo;
562+
message_error = message_error + $.formUtils.LANG.passwordComplexitySeparator + numRequiredLowercaseChars + $.formUtils.LANG.passwordComplexityLowercaseInfo;
562563
}
563564
else{
564565
error = true;
565-
message_error = lang.passwordComplexityStart + numRequiredLowercaseChars + lang.passwordComplexityLowercaseInfo;
566+
message_error = $.formUtils.LANG.passwordComplexityStart + numRequiredLowercaseChars + $.formUtils.LANG.passwordComplexityLowercaseInfo;
566567
}
567568
}
568569
if (!resultRegExpRequiredSpecialChars){
569570
if (error){
570-
message_error = message_error + lang.passwordComplexitySeparator + numRequiredSpecialChars + lang.passwordComplexitySpecialCharsInfo;
571+
message_error = message_error + $.formUtils.LANG.passwordComplexitySeparator + numRequiredSpecialChars + $.formUtils.LANG.passwordComplexitySpecialCharsInfo;
571572
}
572573
else{
573574
error = true;
574-
message_error = lang.passwordComplexityStart + numRequiredSpecialChars + lang.passwordComplexitySpecialCharsInfo;
575+
message_error = $.formUtils.LANG.passwordComplexityStart + numRequiredSpecialChars + $.formUtils.LANG.passwordComplexitySpecialCharsInfo;
575576
}
576577
}
577578
if (!resultRegExpRequiredNumericChars){
578579
if (error){
579-
message_error = message_error + lang.passwordComplexitySeparator + numRequiredNumericChars + lang.passwordComplexityNumericCharsInfo;
580+
message_error = message_error + $.formUtils.LANG.passwordComplexitySeparator + numRequiredNumericChars + $.formUtils.LANG.passwordComplexityNumericCharsInfo;
580581
}
581582
else{
582-
message_error = lang.passwordComplexityStart + numRequiredNumericChars + lang.passwordComplexityNumericCharsInfo;
583+
message_error = $.formUtils.LANG.passwordComplexityStart + numRequiredNumericChars + $.formUtils.LANG.passwordComplexityNumericCharsInfo;
583584
}
584585
}
585586

586-
this.errorMessage = message_error + lang.passwordComplexityEnd;
587+
this.errorMessage = message_error + $.formUtils.LANG.passwordComplexityEnd;
587588
if(resultRegExpRequiredUppercaseChars && resultRegExpRequiredLowercaseChars && resultRegExpRequiredSpecialChars && resultRegExpRequiredNumericChars){
588589
return true;
589590
}

0 commit comments

Comments
 (0)