-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Konrad Fedorczyk
committed
Mar 22, 2021
1 parent
11d7b1d
commit e849126
Showing
3 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,5 @@ | |
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
require __DIR__ . '/../vendor/autoload.php'; | ||
|
||
use Fedek6\TldMailValidator\TldMailValidator; | ||
|
||
/** @var string $tldsFilePath */ | ||
$tldsFilePath = __DIR__ . '/../data/tlds-alpha-by-domain.txt'; | ||
|
||
/** @var array $addresses */ | ||
$addresses = require __DIR__ . '/addresses.php'; | ||
|
||
/** @var \Fedek6\TldMailValidator\TldMailValidator $validator */ | ||
$validator = new TldMailValidator($tldsFilePath, TldMailValidator::TEST_ALL); | ||
|
||
foreach ($addresses as $address) { | ||
echo "Address {$address} is " . ($validator->validate($address) ? 'valid' : 'invalid') . "\n"; | ||
} |
File renamed without changes.