|
545 | 545 | var pass = $.trim(v);
|
546 | 546 | var result = pass.length >= passwordMinLength;
|
547 | 547 | if (result == false) {
|
548 |
| - validator.passwordErrorMessage = $.mage.__( |
549 |
| - "Minimum length of this field must be equal or greater than %1 symbols." + |
550 |
| - " Leading and trailing spaces will be ignored." |
551 |
| - ).replace('%1', passwordMinLength); |
| 548 | + /*eslint-disable max-len*/ |
| 549 | + validator.passwordErrorMessage = $.mage.__('Minimum length of this field must be equal or greater than %1 symbols. Leading and trailing spaces will be ignored.').replace('%1', passwordMinLength); |
| 550 | + |
| 551 | + /*eslint-enable max-len*/ |
552 | 552 | return result;
|
553 | 553 | }
|
554 | 554 | if (pass.match(/\d+/)) {
|
|
565 | 565 | }
|
566 | 566 | if (counter < passwordMinCharacterSets) {
|
567 | 567 | result = false;
|
568 |
| - validator.passwordErrorMessage = $.mage.__( |
569 |
| - "Minimum of different classes of characters in password is %1." + |
570 |
| - " Classes of characters: Lower Case, Upper Case, Digits, Special Characters." |
571 |
| - ).replace('%1', passwordMinCharacterSets); |
| 568 | + |
| 569 | + /*eslint-disable max-len*/ |
| 570 | + validator.passwordErrorMessage = $.mage.__('Minimum of different classes of characters in password is %1. Classes of characters: Lower Case, Upper Case, Digits, Special Characters.').replace('%1', passwordMinCharacterSets); |
| 571 | + |
| 572 | + /*eslint-enable max-len*/ |
572 | 573 | }
|
573 | 574 | return result;
|
574 | 575 | }, function () {
|
|
984 | 985 |
|
985 | 986 | return !!container.querySelectorAll(selector).length;
|
986 | 987 | },
|
987 |
| - 'Please select one of the options.' |
| 988 | + $.mage.__('Please select one of the options.') |
988 | 989 | ],
|
989 | 990 | "less-than-equals-to": [
|
990 | 991 | function (value, element, params) {
|
|
1145 | 1146 | if (name.match(reMax) && result) {
|
1146 | 1147 | length = name.split('-')[2];
|
1147 | 1148 | result = (v.length <= length);
|
1148 |
| - validator.validateMessage = $.mage.__( |
1149 |
| - "Please enter less or equal than %1 symbols." |
1150 |
| - ).replace('%1', length); |
| 1149 | + validator.validateMessage = $.mage.__('Please enter less or equal than %1 symbols.').replace('%1', length); |
1151 | 1150 | }
|
1152 | 1151 | if (name.match(reMin) && result && !$.mage.isEmpty(v)) {
|
1153 | 1152 | length = name.split('-')[2];
|
1154 | 1153 | result = v.length >= length;
|
1155 |
| - validator.validateMessage = $.mage.__( |
1156 |
| - "Please enter more or equal than %1 symbols." |
1157 |
| - ).replace('%1', length); |
| 1154 | + validator.validateMessage = $.mage.__('Please enter more or equal than %1 symbols.').replace('%1', length); |
1158 | 1155 | }
|
1159 | 1156 | });
|
1160 | 1157 | return result;
|
|
0 commit comments