Skip to content

Commit e8f2ca7

Browse files
authored
Update structure-models.md (yiisoft#19846)
1 parent 5bbf901 commit e8f2ca7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/guide/structure-models.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ public function rules()
293293

294294
// username and password are required in "login" scenario
295295
[['username', 'password'], 'required', 'on' => self::SCENARIO_LOGIN],
296+
297+
[['username'], 'string'], // username must always be a string, this rule applies to all scenarios
296298
];
297299
}
298300
```

0 commit comments

Comments
 (0)