Skip to content

Commit

Permalink
Allow to insert Persian characters!
Browse files Browse the repository at this point in the history
update line 132 to allow insert unicode letters in Persian language.
  • Loading branch information
sIiiS authored Sep 27, 2016
1 parent fb6faf5 commit c6d8b79
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 c6d8b79

Please sign in to comment.