mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-08-24 14:18:13 +00:00
cfa3d44471
* Move files in typical src and tests folder * Fix psalm error
33 lines
606 B
PHP
33 lines
606 B
PHP
<?php
|
|
|
|
namespace Egulias\EmailValidator\Validation;
|
|
|
|
use Egulias\EmailValidator\Exception\InvalidEmail;
|
|
|
|
class MultipleErrors extends InvalidEmail
|
|
{
|
|
const CODE = 999;
|
|
const REASON = "Accumulated errors for multiple validations";
|
|
/**
|
|
* @var InvalidEmail[]
|
|
*/
|
|
private $errors = [];
|
|
|
|
/**
|
|
* @param InvalidEmail[] $errors
|
|
*/
|
|
public function __construct(array $errors)
|
|
{
|
|
$this->errors = $errors;
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* @return InvalidEmail[]
|
|
*/
|
|
public function getErrors()
|
|
{
|
|
return $this->errors;
|
|
}
|
|
}
|