Skip to content

Commit 18e509c

Browse files
committed
updating code to handle misleading error in add product attribute screen by make error message more genric
1 parent 9aa4cfa commit 18e509c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/web/legacy-build.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/web/mage/validation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@
982982
function (v) {
983983
return $.mage.isEmptyNoTrim(v) || /^[a-z]+[a-z0-9_]+$/.test(v);
984984
},
985-
$.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
985+
$.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
986986
],
987987
'validate-alphanum': [
988988
function (v) {

lib/web/prototype/validation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ Validation.addAllThese([
513513
['validate-alpha', 'Please use letters only (a-z or A-Z) in this field.', function (v) {
514514
return Validation.get('IsEmpty').test(v) || /^[a-zA-Z]+$/.test(v)
515515
}],
516-
['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) {
516+
['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) {
517517
return Validation.get('IsEmpty').test(v) || /^[a-z]+[a-z0-9_]+$/.test(v)
518518
}],
519519
['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) {

0 commit comments

Comments
 (0)