mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-30 22:48:19 +08:00
Convert to short syntax (array)
This commit is contained in:
@@ -19,14 +19,14 @@ class LoginForm extends Model
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return array(
|
||||
return [
|
||||
// username and password are both required
|
||||
array('username, password', 'required'),
|
||||
['username, password', 'required'],
|
||||
// password is validated by validatePassword()
|
||||
array('password', 'validatePassword'),
|
||||
['password', 'validatePassword'],
|
||||
// rememberMe must be a boolean value
|
||||
array('rememberMe', 'boolean'),
|
||||
);
|
||||
['rememberMe', 'boolean'],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user