You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
520 B
28 lines
520 B
<?php |
|
|
|
namespace app\hejiang; |
|
|
|
/** |
|
* Model validation error response class |
|
* |
|
* @property string $errorText |
|
*/ |
|
class ValidationErrorResponse extends ApiResponse |
|
{ |
|
public function __construct($errors) |
|
{ |
|
parent::__construct(1); |
|
$firstItem = reset($errors); |
|
$this->errorText = $firstItem[0]; |
|
} |
|
|
|
public function getErrorText() |
|
{ |
|
return $this->msg; |
|
} |
|
|
|
protected function setErrorText($value) |
|
{ |
|
$this->msg = $value; |
|
} |
|
} |