Role name UTF-8 support

Adding `u` modifiers to regex for UTF-8 support
This commit is contained in:
Oleksandr Khobta
2021-06-04 18:01:08 +03:00
committed by GitHub
parent 41dc467bf3
commit 8d7eeaab3a

View File

@ -97,7 +97,7 @@ abstract class AbstractAuthItem extends Model
return [
['itemName', 'safe'],
['name', 'required'],
['name', 'match', 'pattern' => '/^\w[\w.:\-]+\w$/'],
['name', 'match', 'pattern' => '/^\w[\w.:\-]+\w$/u'],
[['name', 'description', 'rule'], 'trim'],
[
'name',