1 | <?php |
||
2 | |||
3 | namespace GloBee\PaymentApi\Exceptions\Validation; |
||
4 | |||
5 | class InvalidEmailException extends ValidationException |
||
6 | { |
||
7 | /** |
||
8 | * InvalidEmailException constructor. |
||
9 | * |
||
10 | * @param string $field |
||
0 ignored issues
–
show
Coding Style
Documentation
introduced
by
![]() |
|||
11 | * @param string $email |
||
0 ignored issues
–
show
|
|||
12 | */ |
||
13 | 2 | public function __construct($field, $email) |
|
0 ignored issues
–
show
|
|||
14 | { |
||
15 | 2 | $message = sprintf('The %s must be a valid email address.', $field); |
|
16 | $error = [ |
||
17 | 2 | 'type' => 'invalid_email', |
|
18 | 'extra' => null, |
||
19 | 2 | 'field' => $field, |
|
20 | 2 | 'message' => $message, |
|
21 | ]; |
||
22 | 2 | parent::__construct([$error], $message); |
|
23 | 2 | } |
|
24 | } |
||
25 |