Skip to content

Commit c5150cb

Browse files
author
MailboxValidator
committed
Minor update
- Tested with Laravel 11 - Added a full sample code for displaying validation result.
1 parent 2d2ab65 commit c5150cb

2 files changed

Lines changed: 23 additions & 3 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Laravel package to validate an email by using MailboxValidator API.",
44
"type": "library",
55
"license": "LGPL-3.0-or-later",
6-
"keywords": ["laravel","mailboxvalidator","email validation","disposable", "laravel 5", "laravel 6", "laravel 7", "laravel 8", "laravel 9"],
6+
"keywords": ["laravel","mailboxvalidator","email validation","disposable", "laravel 5", "laravel 6", "laravel 7", "laravel 8", "laravel 9", "laravel 10", "laravel 11"],
77
"authors": [
88
{
99
"name": "MailboxValidator",

readme.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This module can be useful in many types of projects, for example
99
- to perform fraud check
1010
- and so on
1111

12-
*Note: This extension works in Laravel 5, Laravel 6, Laravel 7, Laravel 8 and Laravel 9.*
12+
*Note: This extension works in Laravel 5, Laravel 6, Laravel 7, Laravel 8, Laravel 9, Laravel 10 and Laravel 11.*
1313

1414
## Installation
1515

@@ -68,7 +68,27 @@ Check the email address from the form and validate it whether is a disposable em
6868

6969
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/).
7070

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.
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. For example, your controller file might be looks like this:
72+
73+
```php
74+
<?php
75+
76+
namespace App\Http\Controllers;
77+
78+
use Illuminate\Http\Request;
79+
use MailboxValidatorLaravel\Validation\ValidateEmail;
80+
81+
class ViewValidateResultController extends Controller
82+
{
83+
public function print_result(){
84+
$validate = new ValidateEmail();
85+
$validate_result = $validate->GetValidateDisposable('email_tobe_validate','your_api_key');
86+
var_dump($validate_result);
87+
}
88+
}
89+
90+
91+
```
7292

7393
## Errors
7494

0 commit comments

Comments
 (0)