Skip to content

Commit ddd481f

Browse files
committed
MAGETWO-66556: Allow to insert Persian characters for attributes! #6773
- Merge Pull Request #6773 from sIiiS/magento2:patch-10
2 parents 2b24aa3 + c6d8b79 commit ddd481f

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)