File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
app/code/Magento/Ui/view/base/web/js/lib/validation Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 4
4
*/
5
5
define ( [
6
6
'./utils' ,
7
+ 'underscore' ,
7
8
'jquery' ,
8
9
'jquery/validate' ,
9
10
'jquery/ui' ,
10
11
'mage/translate'
11
- ] , function ( utils , $ ) {
12
+ ] , function ( utils , _ , $ ) {
12
13
'use strict' ;
13
14
14
15
/**
@@ -47,13 +48,13 @@ define([
47
48
return {
48
49
"min_text_length" : [
49
50
function ( value , params ) {
50
- return value . length == 0 || value . length >= + params ;
51
+ return _ . isUndefined ( value ) || value . length == 0 || value . length >= + params ;
51
52
} ,
52
53
$ . mage . __ ( 'Please enter more or equal than {0} symbols.' )
53
54
] ,
54
55
"max_text_length" : [
55
56
function ( value , params ) {
56
- return value . length <= + params ;
57
+ return ! _ . isUndefined ( value ) && value . length <= + params ;
57
58
} ,
58
59
$ . mage . __ ( 'Please enter less or equal than {0} symbols.' )
59
60
] ,
You can’t perform that action at this time.
0 commit comments