Garden\Validation::__construct PHP Method

__construct() public method

Initialize an instance of the {@link Validation} class.
public __construct ( array $errors = [], string $mainMessage = '', integer $status )
$errors array An array of errors.
$mainMessage string The main message of the error.
$status integer The http status code of the error or 0 to build the status code from the indivdual errors.
    public function __construct(array $errors = [], $mainMessage = '', $status = 0)
    {
        $this->errors = $errors;
        $this->mainMessage = $mainMessage;
        $this->status = $status;
    }