This method validate email addresses against both the general format and the one described in RFC 822.
This method takes two arguments:
An email address.
An array of options (optional).
Various option are:
check_domain (boolean) - Check or not if the domain exists.
use_rfc822 (boolean) - Apply the full RFC822 grammar.
fullTLDValidation (boolean) - All top-level domains.
VALIDATE_GTLD_EMAILS (boolean) - Only generic top-level domains.
VALIDATE_CCTLD_EMAILS (boolean) - Only country code top-level domains.
VALIDATE_ITLD_EMAILS (boolean) - Only international top-level domains.
Example 66-1. Email Validation The following example assumes that one wants to use RFC822 strict mode to validate email addresses.
And the following one assumes that one wants to check if the domain exists.
|