Skip to content

Commit d4d316e

Browse files
committed
Regular expression A-Z
1 parent 927a6e2 commit d4d316e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/code/Magento/Store/Model/Store.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
use Magento\Framework\App\Http\Context;
1313
use Magento\Framework\App\ObjectManager;
1414
use Magento\Framework\App\ScopeInterface as AppScopeInterface;
15-
use Magento\Framework\Filesystem;
1615
use Magento\Framework\DataObject\IdentityInterface;
17-
use Magento\Framework\Url\ScopeInterface as UrlScopeInterface;
16+
use Magento\Framework\Filesystem;
1817
use Magento\Framework\Model\AbstractExtensibleModel;
18+
use Magento\Framework\Url\ScopeInterface as UrlScopeInterface;
1919
use Magento\Framework\UrlInterface;
2020
use Magento\Store\Api\Data\StoreInterface;
2121

@@ -463,10 +463,10 @@ protected function _getValidationRulesBeforeSave()
463463
$storeLabelRule->setMessage(__('Name is required'), \Zend_Validate_NotEmpty::IS_EMPTY);
464464
$validator->addRule($storeLabelRule, 'name');
465465

466-
$storeCodeRule = new \Zend_Validate_Regex('/^[a-z]+[a-z0-9_]*$/');
466+
$storeCodeRule = new \Zend_Validate_Regex('/^[a-zA-Z]+[a-z0-9_]*$/');
467467
$storeCodeRule->setMessage(
468468
__(
469-
'The store code may contain only letters (a-z), numbers (0-9) or underscore (_),'
469+
'The store code may contain only letters (a-zA-Z), numbers (0-9) or underscore (_),'
470470
. ' and the first character must be a letter.'
471471
),
472472
\Zend_Validate_Regex::NOT_MATCH

0 commit comments

Comments
 (0)