mirror of
https://github.com/yiisoft/yii2.git
synced 2025-10-29 01:17:13 +08:00
Fix #20513: Fix code examples in PHPDoc
This commit is contained in:
@ -16,7 +16,7 @@ use yii\validators\Validator;
|
||||
*
|
||||
* The typical usage of DynamicModel is as follows,
|
||||
*
|
||||
* ```php
|
||||
* ```
|
||||
* public function actionSearch($name, $email)
|
||||
* {
|
||||
* $model = DynamicModel::validateData(compact('name', 'email'), [
|
||||
@ -41,7 +41,7 @@ use yii\validators\Validator;
|
||||
*
|
||||
* Alternatively, you may use the following more "classic" syntax to perform ad-hoc data validation:
|
||||
*
|
||||
* ```php
|
||||
* ```
|
||||
* $model = new DynamicModel(compact('name', 'email'));
|
||||
* $model->addRule(['name', 'email'], 'string', ['max' => 128])
|
||||
* ->addRule('email', 'email')
|
||||
|
||||
Reference in New Issue
Block a user