mirror of
https://github.com/yiisoft/yii2.git
synced 2025-12-09 23:18:07 +08:00
Change validators from 'length' to 'string'
This commit is contained in:
@@ -79,7 +79,7 @@ class User extends ActiveRecord implements Identity
|
||||
return array(
|
||||
array('username', 'filter', 'filter' => 'trim'),
|
||||
array('username', 'required'),
|
||||
array('username', 'length', 'min' => 2, 'max' => 255),
|
||||
array('username', 'string', 'min' => 2, 'max' => 255),
|
||||
|
||||
array('email', 'filter', 'filter' => 'trim'),
|
||||
array('email', 'required'),
|
||||
@@ -87,7 +87,7 @@ class User extends ActiveRecord implements Identity
|
||||
array('email', 'unique', 'message' => 'This email address has already been taken.'),
|
||||
|
||||
array('password', 'required'),
|
||||
array('password', 'length', 'min' => 6),
|
||||
array('password', 'string', 'min' => 6),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user