Skip to content

Commit fdb86a5

Browse files
author
Stanislav Idolov
authored
ENGCOM-3203: Patch 17865 2.3 develop #18639
2 parents a5fad04 + 00967e2 commit fdb86a5

File tree

1 file changed

+4
-1
lines changed
  • app/code/Magento/CatalogImportExport/Model/Import/Product

1 file changed

+4
-1
lines changed

app/code/Magento/CatalogImportExport/Model/Import/Product/Validator.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
use Magento\CatalogImportExport\Model\Import\Product;
99
use Magento\Framework\Validator\AbstractValidator;
10+
use Magento\Catalog\Model\Product\Attribute\Backend\Sku;
1011

1112
/**
1213
* Class Validator
@@ -69,6 +70,8 @@ protected function textValidation($attrCode, $type)
6970
$val = $this->string->cleanString($this->_rowData[$attrCode]);
7071
if ($type == 'text') {
7172
$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;
7275
} else {
7376
$valid = $this->string->strlen($val) < Product::DB_MAX_VARCHAR_LENGTH;
7477
}
@@ -341,4 +344,4 @@ public function init($context)
341344
$validator->init($context);
342345
}
343346
}
344-
}
347+
}

0 commit comments

Comments
 (0)