Skip to content

Commit

Permalink
Username regexps PCRE2 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
maxxer committed Apr 19, 2019
1 parent 4455075 commit ec428ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/User/Model/AbstractAuthItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function rules()
return [
['itemName', 'safe'],
['name', 'required'],
['name', 'match', 'pattern' => '/^[\w][\w.:-]+[\w]$/'],
['name', 'match', 'pattern' => '/^\w[\w.:\-]+\w$/'],
[['name', 'description', 'rule'], 'trim'],
[
'name',
Expand Down
2 changes: 1 addition & 1 deletion src/User/Model/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function rules()
return [
[['name', 'className'], 'trim'],
[['name', 'className'], 'required'],
[['name', 'previousName'], 'match', 'pattern' => '/^[\w][\w.:-]+[\w]$/'],
[['name', 'previousName'], 'match', 'pattern' => '/^\w[\w.:\-]+\w$/'],
[['name'], RbacRuleNameValidator::class, 'previousName' => $this->previousName],
[['className'], RbacRuleValidator::class],
];
Expand Down

0 comments on commit ec428ab

Please sign in to comment.