Download the PHP package mailboxvalidator/mailboxvalidator-bundle without Composer
On this page you can find all versions of the php package mailboxvalidator/mailboxvalidator-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mailboxvalidator/mailboxvalidator-bundle
More information about mailboxvalidator/mailboxvalidator-bundle
Files in mailboxvalidator/mailboxvalidator-bundle
Package mailboxvalidator-bundle
Short Description Symfony bundle that used MailboxValidator API to validate email in form.
License MIT
Homepage https://www.mailboxvalidator.com
Informations about the package mailboxvalidator-bundle
MailboxValidator Symfony Email Validation Bundle
MailboxValidator Symfony Email Validation Bundle enables user to easily validate if an email address is valid, a type of disposable email or free email.
This bundle can be useful in many types of projects, for example
- to validate an user's email during sign up
- to clean your mailing list prior to email sending
- to perform fraud check
- and so on
Note: This bundle only support Symfony 4.3 and onwards.
Installation
We recommend the installation via Composer. Open the terminal, navigate to your project root and run the following commands:
Dependencies
An API key is required for this module to function.
-
Go to https://www.mailboxvalidator.com to sign up for FREE API plan if you do not have an API key.
-
(If you are at Symfony 4) After obtained your API key, load a
.env
file in your PHP application viaDotenv::load()
. - Open your
.env
file and add the following line:
Notes: You need to install the MailboxValidator PHP Module in order to use this bundle. You can visit https://github.com/MailboxValidator/mailboxvalidator-php for the source codes.
Usage
Before using the validator, be sure to add the bundle into the config/bundles.php
file:
The validators available to validate the email are: single, free and disposable. Each validator validate the email by using MailboxValidator API. For more information, you can visit Single Validation API, Disposable Email API and Free Email API.
-
To use any one of three validators or use all of the validators, include the following lines in any form controller that handle the validation:
- After that, add a new rule to your form field. For example, if you want to validate the disposable email, your rule will be like this:
Copyright
Copyright (C) 2024 by MailboxValidator.com
All versions of mailboxvalidator-bundle with dependencies
symfony/framework-bundle Version ^7.2
mailboxvalidator/mailboxvalidator-php Version 2.*.*