Skip to content

Commit

Permalink
updating code to handle misleading error in add product attribute scr…
Browse files Browse the repository at this point in the history
…een by make error message more genric
  • Loading branch information
aman3103 committed Aug 26, 2018
1 parent 9aa4cfa commit 18e509c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/web/legacy-build.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/web/mage/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@
function (v) {
return $.mage.isEmptyNoTrim(v) || /^[a-z]+[a-z0-9_]+$/.test(v);
},
$.mage.__('Please use only letters (a-z), numbers (0-9) or underscore (_) in this field, and the first character should be a letter.') //eslint-disable-line max-len
$.mage.__('Please use only lowercase letters (a-z), numbers (0-9) or underscore (_) in this field, and the first character should be a letter.') //eslint-disable-line max-len
],
'validate-alphanum': [
function (v) {
Expand Down
2 changes: 1 addition & 1 deletion lib/web/prototype/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ Validation.addAllThese([
['validate-alpha', 'Please use letters only (a-z or A-Z) in this field.', function (v) {
return Validation.get('IsEmpty').test(v) || /^[a-zA-Z]+$/.test(v)
}],
['validate-code', 'Please use only letters (a-z), numbers (0-9) or underscore (_) in this field, and the first character should be a letter.', function (v) {
['validate-code', 'Please use only lowercase letters (a-z), numbers (0-9) or underscore (_) in this field, and the first character should be a letter.', function (v) {
return Validation.get('IsEmpty').test(v) || /^[a-z]+[a-z0-9_]+$/.test(v)
}],
['validate-alphanum', 'Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.', function(v) {
Expand Down

0 comments on commit 18e509c

Please sign in to comment.