Skip to content

Commit c6d8b79

Browse files
authored
Allow to insert Persian characters!
update line 132 to allow insert unicode letters in Persian language.
1 parent fb6faf5 commit c6d8b79

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)