mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-17 23:09:10 +08:00
Merge pull request #695 from Jomaanro/master
[doc] Correct validation rule in model
This commit is contained in:
@@ -237,8 +237,8 @@ function rules()
|
||||
{
|
||||
return array(
|
||||
// rule applied when corresponding field is "safe"
|
||||
array('username', 'length', 'min' => 2),
|
||||
array('first_name', 'length', 'min' => 2),
|
||||
array('username', 'string', 'min' => 2),
|
||||
array('first_name', 'string', 'min' => 2),
|
||||
array('password', 'required'),
|
||||
|
||||
// rule applied when scenario is "signup" no matter if field is "safe" or not
|
||||
|
||||
Reference in New Issue
Block a user