File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
app/code/Magento/CatalogImportExport/Model/Import/Product Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 7
7
8
8
use Magento \CatalogImportExport \Model \Import \Product ;
9
9
use Magento \Framework \Validator \AbstractValidator ;
10
+ use Magento \Catalog \Model \Product \Attribute \Backend \Sku ;
10
11
11
12
/**
12
13
* Class Validator
@@ -69,6 +70,8 @@ protected function textValidation($attrCode, $type)
69
70
$ val = $ this ->string ->cleanString ($ this ->_rowData [$ attrCode ]);
70
71
if ($ type == 'text ' ) {
71
72
$ valid = $ this ->string ->strlen ($ val ) < Product::DB_MAX_TEXT_LENGTH ;
73
+ } else if ($ attrCode == Product::COL_SKU ) {
74
+ $ valid = $ this ->string ->strlen ($ val ) <= SKU ::SKU_MAX_LENGTH ;
72
75
} else {
73
76
$ valid = $ this ->string ->strlen ($ val ) < Product::DB_MAX_VARCHAR_LENGTH ;
74
77
}
@@ -341,4 +344,4 @@ public function init($context)
341
344
$ validator ->init ($ context );
342
345
}
343
346
}
344
- }
347
+ }
You can’t perform that action at this time.
0 commit comments