* Class DbNameValidator is used to validate DB names.
17
*/
18
class DbNameValidator extends RegularExpressionValidator
19
{
20
/**
21
* {@inheritdoc}
22
*/
23
public $pattern = '/^[a-z0-9_-]{2,31}$/';
24
25
/**
26
* {@inheritdoc}
27
*/
28
public function init()
29
{
30
$this->message = \Yii::t('hipanel:hosting', '{attribute} should contain only letters, digits, underscores or hyphens and be at least 2 symbols length');