Skip to content

Commit 1408b4b

Browse files
author
Oleksii Korshenko
authored
MAGETWO-66556: Allow to insert Persian characters for attributes! #6773
2 parents 386d16d + ddd481f commit 1408b4b

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function execute()
129129
$attributeCode = $this->getRequest()->getParam('attribute_code')
130130
?: $this->generateCode($this->getRequest()->getParam('frontend_label')[0]);
131131
if (strlen($attributeCode) > 0) {
132-
$validatorAttrCode = new \Zend_Validate_Regex(['pattern' => '/^[a-z][a-z_0-9]{0,30}$/']);
132+
$validatorAttrCode = new \Zend_Validate_Regex(['pattern' => '/^[a-z\x{600}-\x{6FF}][a-z\x{600}-\x{6FF}_0-9]{0,30}$/u']);
133133
if (!$validatorAttrCode->isValid($attributeCode)) {
134134
$this->messageManager->addError(
135135
__(

0 commit comments

Comments
 (0)