Email final class
Minn\Support\Email · public/minn/src/Minn/Support/Email.php · 69 lines
The address rules the reference applies: a local part from a fixed character class, a dotted domain of hyphen-trimmed labels. `check` names the first rule an address breaks; `sanitize` strips what it can and names why it gave up.
Used by 1
Constants and properties
| private | LOCAL_CHARACTER = 'a-zA-Z0-9!#$%&\'*+\\/=?^_`{|}~\\.-' |
Public
| static | check(string $email): ?string# | Why an address is invalid, or null when it passes the reference's checks. |
| static | sanitize(string $raw): array# | An address with the characters the reference strips removed, and what was removed. @return array{0: string, 1: string|null} the cleaned address (empty when refused) and the reason |
Nothing matches.