|
533 | 533 | patternLowerCaseChars = '^(?=(?:.*[a-z]){'+numRequiredLowercaseChars+',}).+',
|
534 | 534 | patternSpecialChars = '^(?=(?:.*(_|[!"#$%&\'()*+\\\\,-./:;<=>?@[\\]^_`{|}~])){'+numRequiredSpecialChars+',}).+',
|
535 | 535 | 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 = ''; |
541 | 542 |
|
542 | 543 | if (numRequiredUppercaseChars !== '0'){
|
543 | 544 | resultRegExpRequiredUppercaseChars = new RegExp(patternUpperCaseChars).test(val);
|
|
554 | 555 |
|
555 | 556 | if (!resultRegExpRequiredUppercaseChars){
|
556 | 557 | error = true;
|
557 |
| - message_error = lang.passwordComplexityStart + numRequiredUppercaseChars + lang.passwordComplexityUppercaseInfo; |
| 558 | + message_error = $.formUtils.LANG.passwordComplexityStart + numRequiredUppercaseChars + $.formUtils.LANG.passwordComplexityUppercaseInfo; |
558 | 559 | }
|
559 | 560 | if (!resultRegExpRequiredLowercaseChars){
|
560 | 561 | if (error){
|
561 |
| - message_error = message_error + lang.passwordComplexitySeparator + numRequiredLowercaseChars + lang.passwordComplexityLowercaseInfo; |
| 562 | + message_error = message_error + $.formUtils.LANG.passwordComplexitySeparator + numRequiredLowercaseChars + $.formUtils.LANG.passwordComplexityLowercaseInfo; |
562 | 563 | }
|
563 | 564 | else{
|
564 | 565 | error = true;
|
565 |
| - message_error = lang.passwordComplexityStart + numRequiredLowercaseChars + lang.passwordComplexityLowercaseInfo; |
| 566 | + message_error = $.formUtils.LANG.passwordComplexityStart + numRequiredLowercaseChars + $.formUtils.LANG.passwordComplexityLowercaseInfo; |
566 | 567 | }
|
567 | 568 | }
|
568 | 569 | if (!resultRegExpRequiredSpecialChars){
|
569 | 570 | if (error){
|
570 |
| - message_error = message_error + lang.passwordComplexitySeparator + numRequiredSpecialChars + lang.passwordComplexitySpecialCharsInfo; |
| 571 | + message_error = message_error + $.formUtils.LANG.passwordComplexitySeparator + numRequiredSpecialChars + $.formUtils.LANG.passwordComplexitySpecialCharsInfo; |
571 | 572 | }
|
572 | 573 | else{
|
573 | 574 | error = true;
|
574 |
| - message_error = lang.passwordComplexityStart + numRequiredSpecialChars + lang.passwordComplexitySpecialCharsInfo; |
| 575 | + message_error = $.formUtils.LANG.passwordComplexityStart + numRequiredSpecialChars + $.formUtils.LANG.passwordComplexitySpecialCharsInfo; |
575 | 576 | }
|
576 | 577 | }
|
577 | 578 | if (!resultRegExpRequiredNumericChars){
|
578 | 579 | if (error){
|
579 |
| - message_error = message_error + lang.passwordComplexitySeparator + numRequiredNumericChars + lang.passwordComplexityNumericCharsInfo; |
| 580 | + message_error = message_error + $.formUtils.LANG.passwordComplexitySeparator + numRequiredNumericChars + $.formUtils.LANG.passwordComplexityNumericCharsInfo; |
580 | 581 | }
|
581 | 582 | else{
|
582 |
| - message_error = lang.passwordComplexityStart + numRequiredNumericChars + lang.passwordComplexityNumericCharsInfo; |
| 583 | + message_error = $.formUtils.LANG.passwordComplexityStart + numRequiredNumericChars + $.formUtils.LANG.passwordComplexityNumericCharsInfo; |
583 | 584 | }
|
584 | 585 | }
|
585 | 586 |
|
586 |
| - this.errorMessage = message_error + lang.passwordComplexityEnd; |
| 587 | + this.errorMessage = message_error + $.formUtils.LANG.passwordComplexityEnd; |
587 | 588 | if(resultRegExpRequiredUppercaseChars && resultRegExpRequiredLowercaseChars && resultRegExpRequiredSpecialChars && resultRegExpRequiredNumericChars){
|
588 | 589 | return true;
|
589 | 590 | }
|
|
0 commit comments