boxuk / wordpress-email-tld-checker
A small WordPress plugin to validate email addresses against valid TLDs.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 20
Forks: 1
Type:wordpress-plugin
Requires
- php: ^7.2
- arubacao/tld-checker: ^1.2
- symfony/polyfill-intl-idn: ^1.12
Requires (Dev)
Suggests
- ext-intl: Use the intl extension rather than the polyfill for converting domain names to IDNA ASCII form.
- composer/installers: To ensure this package is installed in the appropriate place for a WordPress plugin.
This package is auto-updated.
Last update: 2024-10-30 11:24:09 UTC
README
A small WordPress plugin to validate email addresses against valid TLDs.
https://github.com/BoxUk/wordpress-email-tld-checker
Installation
Installation is handled via Composer.
composer require boxuk/wordpress-email-tld-checker
Make sure you have composer/installers configured to install within the plugins dir.
Activate the plugin.
wp plugin activate wordpress-email-tld-checker
Or via the plugins section of the admin UI.
Usage
Once the plugin is activated, an email validation (is_email()
) will now check that the TLD (the .com bit for example) is valid according to the official IANA database.
Troubleshooting
The plugin is designed to be installed with Composer and assumes you are including somewhere the autoloader that comes with composer, if you're not then you may run into some issues. The easiest way to resolve is to include the autolaod.php
from composer, but failing that you may be able to manually require the following files:
$vendor_dir . '/symfony/polyfill-intl-idn/Idn.php'
$vendor_dir . '/symfony/polyfill-intl-idn/bootstrap.php'
$vendor_dir . '/arubacao/tld-checker/src/RootZoneDatabase.php'
$vendor_dir . '/arubacao/tld-checker/src/Validator.php'
$this_plugin_dir . '/functions.php