Skip to content

Commit 64f9c6d

Browse files
magento#12342: JSTestDriver removal
- Fix validation.
1 parent fa69aa5 commit 64f9c6d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/web/mage/validation.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -845,11 +845,13 @@
845845
result = true;
846846
range = param;
847847

848-
if (range) {
848+
if (typeof range === 'string') {
849849
m = dataAttrRange.exec(range);
850850

851851
if (m) {
852852
result = result && $.mage.isBetween(numValue, m[1], m[2]);
853+
} else {
854+
result = false;
853855
}
854856
} else if (elm && elm.className) {
855857
classes = elm.className.split(' ');
@@ -896,7 +898,7 @@
896898
result = true;
897899
range = param;
898900

899-
if (range) {
901+
if (typeof range === 'string') {
900902
m = dataAttrRange.exec(range);
901903

902904
if (m) {

0 commit comments

Comments
 (0)