Skip to content

Commit

Permalink
MAGETWO-66556: Allow to insert Persian characters for attributes! #6773
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Korshenko authored Mar 22, 2017
2 parents 386d16d + ddd481f commit 1408b4b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function execute()
$attributeCode = $this->getRequest()->getParam('attribute_code')
?: $this->generateCode($this->getRequest()->getParam('frontend_label')[0]);
if (strlen($attributeCode) > 0) {
$validatorAttrCode = new \Zend_Validate_Regex(['pattern' => '/^[a-z][a-z_0-9]{0,30}$/']);
$validatorAttrCode = new \Zend_Validate_Regex(['pattern' => '/^[a-z\x{600}-\x{6FF}][a-z\x{600}-\x{6FF}_0-9]{0,30}$/u']);
if (!$validatorAttrCode->isValid($attributeCode)) {
$this->messageManager->addError(
__(
Expand Down

0 comments on commit 1408b4b

Please sign in to comment.