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.
34 lines
751 B
34 lines
751 B
<?php |
|
|
|
namespace Egulias\EmailValidator\Validation; |
|
|
|
use Egulias\EmailValidator\EmailLexer; |
|
use Egulias\EmailValidator\Exception\InvalidEmail; |
|
use Egulias\EmailValidator\Warning\Warning; |
|
|
|
interface EmailValidation |
|
{ |
|
/** |
|
* Returns true if the given email is valid. |
|
* |
|
* @param string $email The email you want to validate. |
|
* @param EmailLexer $emailLexer The email lexer. |
|
* |
|
* @return bool |
|
*/ |
|
public function isValid($email, EmailLexer $emailLexer); |
|
|
|
/** |
|
* Returns the validation error. |
|
* |
|
* @return InvalidEmail|null |
|
*/ |
|
public function getError(); |
|
|
|
/** |
|
* Returns the validation warnings. |
|
* |
|
* @return Warning[] |
|
*/ |
|
public function getWarnings(); |
|
}
|
|
|