3 namespace Egulias\EmailValidator;
6 * EmailValidatorInterface
8 * @author Chris McCafferty <cilefen@gmail.com>
10 interface EmailValidatorInterface
13 * Validates an email address against the following standards:
15 * RFC-5321: Simple Mail Transfer Protocol
16 * RFC-5322: Internet Message Format
17 * RFC-6530: Overview and Framework for Internationalized Email
18 * RFC-6531: SMTP Extension for Internationalized Email
19 * RFC-6532: Internationalized Email Headers
20 * RFC-1123 section 2.1: Requirements for Internet Hosts -- Application and Support
21 * RFC-4291 section 2.2: IP Version 6 Addressing Architecture
23 * @param string $email The email address to validate.
24 * @param bool $checkDNS Whether or not the email address's hostname should
25 * be confirmed with a DNS lookup. This only comes
26 * into play if strict mode is also enabled.
27 * @param bool $strict If this is true, and any informational warnings
28 * were raised during validation, the email address
29 * will be considered invalid. Additionally, if
30 * $checkDNS is true and the DNS lookup failed,
31 * the email address will be considered invalid.
34 public function isValid($email, $checkDNS = false, $strict = false);
39 public function hasWarnings();
44 public function getWarnings();
49 public function getError();
52 * @param int $threshold The acceptable number of deprecation warnings.
54 * @return EmailValidator
56 public function setThreshold($threshold);
61 public function getThreshold();