Skip to content

Commit 853be23

Browse files
Added supported Laravel versions.
1 parent 85567af commit 853be23

File tree

2 files changed

+120
-120
lines changed

2 files changed

+120
-120
lines changed

composer.json

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
{
2-
"name": "mailboxvalidatorlaravel/validation",
3-
"description": "Laravel package to validate an email by using MailboxValidator API.",
4-
"type": "library",
5-
"license": "LGPL-3.0-or-later",
6-
"keywords": ["laravel","mailboxvalidator","email validation","disposable"],
7-
"authors": [
8-
{
9-
"name": "MailboxValidator",
10-
"email": "support@mailboxvalidator.com"
11-
}
12-
],
13-
"require": {
14-
},
15-
"autoload": {
16-
"psr-4": {
17-
"MailboxValidatorLaravel\\Validation\\": "src"
18-
}
19-
},
20-
"autoload-dev": {
21-
"psr-4": {
22-
"MailboxValidatorLaravel\\Validation\\Test\\": "tests"
23-
}
24-
},
25-
"extra": {
26-
"laravel": {
27-
"providers": [
28-
"MailboxValidatorLaravel\\Validation\\ValidationServiceProvider"
29-
]
30-
}
31-
}
32-
}
1+
{
2+
"name": "mailboxvalidatorlaravel/validation",
3+
"description": "Laravel package to validate an email by using MailboxValidator API.",
4+
"type": "library",
5+
"license": "LGPL-3.0-or-later",
6+
"keywords": ["laravel","mailboxvalidator","email validation","disposable", "laravel 5", "laravel 6", "laravel 7", "laravel 8"],
7+
"authors": [
8+
{
9+
"name": "MailboxValidator",
10+
"email": "support@mailboxvalidator.com"
11+
}
12+
],
13+
"require": {
14+
},
15+
"autoload": {
16+
"psr-4": {
17+
"MailboxValidatorLaravel\\Validation\\": "src"
18+
}
19+
},
20+
"autoload-dev": {
21+
"psr-4": {
22+
"MailboxValidatorLaravel\\Validation\\Test\\": "tests"
23+
}
24+
},
25+
"extra": {
26+
"laravel": {
27+
"providers": [
28+
"MailboxValidatorLaravel\\Validation\\ValidationServiceProvider"
29+
]
30+
}
31+
}
32+
}

readme.md

Lines changed: 88 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,88 @@
1-
# MailboxValidator Laravel Email Validation Package
2-
3-
MailboxValidator Laravel Email Validation Package enables user to easily validate if an email address is a type of disposable email or not.
4-
5-
This module can be useful in many types of projects, for example
6-
7-
- to validate an user's email during sign up
8-
- to clean your mailing list prior to email sending
9-
- to perform fraud check
10-
- and so on
11-
12-
13-
14-
## Installation
15-
16-
Open the terminal, locate to your project root and run the following command :
17-
18-
`composer require mailboxvalidator-laravel/validation`
19-
20-
21-
22-
For Laravel versions below 5.5, you might need the additional step to make Laravel
23-
discover the service provider. Open the `config/app.php` and add the
24-
service provider manually into the providers section:
25-
26-
``MailboxValidatorLaravel\Validation\ValidationServiceProvider::class,``
27-
28-
In the terminal, type the following command to publish the modified config file:
29-
30-
``
31-
php artisan vendor:publish --provider=MailboxValidatorLaravel\Validation\ValidationServiceProvider --force
32-
``
33-
34-
35-
36-
## Dependencies
37-
38-
An API key is required for this module to function.
39-
40-
Go to https://www.mailboxvalidator.com/plans#api to sign up for FREE API plan and you'll be given an API key.
41-
42-
After that, please save your API key in your web application environement file like this:
43-
``
44-
MBV_API_KEY = 'PASTE_YOUR_API_KEY_HERE'
45-
``
46-
47-
## Functions
48-
49-
### GetValidateDisposable (email_address)
50-
51-
Check if the supplied email address is from a disposable email provider.
52-
53-
#### Return Fields
54-
55-
| Field Name | Description |
56-
| ----------------- | ------------------------------------------------------------ |
57-
| email_address | The input email address. |
58-
| is_disposable | Whether the email address is a temporary one from a disposable email provider. Return values: True, False |
59-
| credits_available | The number of credits left to perform validations. |
60-
| error_code | The error code if there is any error. See error table in the below section. |
61-
| error_message | The error message if there is any error. See error table in the below section. |
62-
63-
### ValidateDisposable
64-
65-
Check the email address from the form and validate it whether is a disposable email or not.
66-
67-
## Usage
68-
69-
To use this package to validate the email coming from form submission, you will just need to include `'|disposable'`in Validator function in app\Http\Controllers\Auth\RegisterController.php . A step by step tutorial is included [here](https://www.mailboxvalidator.com/resources/articles/how-to-use-mailboxvalidator-laravel-email-validation-package-to-validate-email-during-registration/).
70-
71-
To print the validation result on single email, you will first need to include this line on top of your file: `use MailboxValidatorLaravel\Validation\ValidateEmail;` . Then, initialite the ValidateEmail class by using this line: `$validate = new ValidateEmail();`. Lastly, just call `$validate->GetValidateDisposable('email_tobe_validate','your_api_key');` into a variable and print out the variable.
72-
73-
## Errors
74-
75-
| error_code | error_message |
76-
| ---------- | --------------------- |
77-
| 100 | Missing parameter. |
78-
| 101 | API key not found. |
79-
| 102 | API key disabled. |
80-
| 103 | API key expired. |
81-
| 104 | Insufficient credits. |
82-
| 105 | Unknown error. |
83-
84-
85-
86-
## Copyright
87-
88-
Copyright (C) 2018-2020 by MailboxValidator.com, support@mailboxvalidator.com
1+
# MailboxValidator Laravel Email Validation Package
2+
3+
MailboxValidator Laravel Email Validation Package enables user to easily validate if an email address is a type of disposable email or not.
4+
5+
This module can be useful in many types of projects, for example
6+
7+
- to validate an user's email during sign up
8+
- to clean your mailing list prior to email sending
9+
- to perform fraud check
10+
- and so on
11+
12+
*Note: This extension works in Laravel 5, Laravel 6, Laravel 7 and Laravel 8.*
13+
14+
## Installation
15+
16+
Open the terminal, locate to your project root and run the following command :
17+
18+
`composer require mailboxvalidator-laravel/validation`
19+
20+
21+
22+
For Laravel versions below 5.5, you might need the additional step to make Laravel
23+
discover the service provider. Open the `config/app.php` and add the
24+
service provider manually into the providers section:
25+
26+
``MailboxValidatorLaravel\Validation\ValidationServiceProvider::class,``
27+
28+
In the terminal, type the following command to publish the modified config file:
29+
30+
``
31+
php artisan vendor:publish --provider=MailboxValidatorLaravel\Validation\ValidationServiceProvider --force
32+
``
33+
34+
35+
36+
## Dependencies
37+
38+
An API key is required for this module to function.
39+
40+
Go to https://www.mailboxvalidator.com/plans#api to sign up for FREE API plan and you'll be given an API key.
41+
42+
After that, please save your API key in your web application environement file like this:
43+
``
44+
MBV_API_KEY = 'PASTE_YOUR_API_KEY_HERE'
45+
``
46+
47+
## Functions
48+
49+
### GetValidateDisposable (email_address)
50+
51+
Check if the supplied email address is from a disposable email provider.
52+
53+
#### Return Fields
54+
55+
| Field Name | Description |
56+
| ----------------- | ------------------------------------------------------------ |
57+
| email_address | The input email address. |
58+
| is_disposable | Whether the email address is a temporary one from a disposable email provider. Return values: True, False |
59+
| credits_available | The number of credits left to perform validations. |
60+
| error_code | The error code if there is any error. See error table in the below section. |
61+
| error_message | The error message if there is any error. See error table in the below section. |
62+
63+
### ValidateDisposable
64+
65+
Check the email address from the form and validate it whether is a disposable email or not.
66+
67+
## Usage
68+
69+
To use this package to validate the email coming from form submission, you will just need to include `'|disposable'`in Validator function in app\Http\Controllers\Auth\RegisterController.php . A step by step tutorial is included [here](https://www.mailboxvalidator.com/resources/articles/how-to-use-mailboxvalidator-laravel-email-validation-package-to-validate-email-during-registration/).
70+
71+
To print the validation result on single email, you will first need to include this line on top of your file: `use MailboxValidatorLaravel\Validation\ValidateEmail;` . Then, initialite the ValidateEmail class by using this line: `$validate = new ValidateEmail();`. Lastly, just call `$validate->GetValidateDisposable('email_tobe_validate','your_api_key');` into a variable and print out the variable.
72+
73+
## Errors
74+
75+
| error_code | error_message |
76+
| ---------- | --------------------- |
77+
| 100 | Missing parameter. |
78+
| 101 | API key not found. |
79+
| 102 | API key disabled. |
80+
| 103 | API key expired. |
81+
| 104 | Insufficient credits. |
82+
| 105 | Unknown error. |
83+
84+
85+
86+
## Copyright
87+
88+
Copyright (C) 2018-2021 by MailboxValidator.com, support@mailboxvalidator.com

0 commit comments

Comments
 (0)