-
Notifications
You must be signed in to change notification settings - Fork 2
Pieter Hordijk edited this page Dec 30, 2018
·
1 revision
Validates the input (string) to be a valid email address according to PHP's native email validation rules.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\Email\NativeEmailAddress;
(new NativeEmailAddress())->validate('test@example.com');-
Type.Stringwhen the validated value is not a string -
Email.NativeEmailAddresswhen the validated value is not a valid email address
Validates the input (string) to be a valid email address according to more RFCs than PHP's native email validation. Uses egulias/EmailValidator to validate email addresses.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\Email\RfcEmailAddress;
(new RfcEmailAddress())->validate('test@example.com');-
Type.Stringwhen the validated value is not a string -
Email.RfcEmailAddresswhen the validated value is not a valid email address