-
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('[email protected]');
-
Type.String
when the validated value is not a string -
Email.NativeEmailAddress
when 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('[email protected]');
-
Type.String
when the validated value is not a string -
Email.RfcEmailAddress
when the validated value is not a valid email address