mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 21:41:19 +08:00
Fix #20513: Fix code examples in PHPDoc
This commit is contained in:
@ -160,7 +160,7 @@ class Validator extends Component
|
||||
*
|
||||
* The following example will enable the validator only when the country currently selected is USA:
|
||||
*
|
||||
* ```php
|
||||
* ```
|
||||
* function ($model) {
|
||||
* return $model->country == Country::USA;
|
||||
* }
|
||||
@ -180,7 +180,7 @@ class Validator extends Component
|
||||
*
|
||||
* The following example will enable the validator only when the country currently selected is USA:
|
||||
*
|
||||
* ```javascript
|
||||
* ```
|
||||
* function (attribute, value) {
|
||||
* return $('#country').val() === 'USA';
|
||||
* }
|
||||
@ -342,7 +342,7 @@ class Validator extends Component
|
||||
* A validator class can implement this method to support data validation out of the context of a data model.
|
||||
* @param mixed $value the data value to be validated.
|
||||
* @return array|null the error message and the array of parameters to be inserted into the error message.
|
||||
* ```php
|
||||
* ```
|
||||
* if (!$valid) {
|
||||
* return [$this->message, [
|
||||
* 'param1' => $this->param1,
|
||||
|
||||
Reference in New Issue
Block a user