| 1 | <?php |
||
| 8 | class JsonValidator extends Validator |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var bool |
||
| 12 | */ |
||
| 13 | public $merge = false; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Map json error constant to message |
||
| 17 | * @see: http://php.net/manual/ru/json.constants.php |
||
| 18 | * @var array |
||
| 19 | */ |
||
| 20 | public $errorMessages = []; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @inheritdoc |
||
| 24 | */ |
||
| 25 | 3 | public function validateAttribute($model, $attribute) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @param \Exception $exception |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | 1 | protected function getErrorMessage($exception) |
|
| 56 | } |
||
| 57 |