承接 tintnaingwin/email-checker 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tintnaingwin/email-checker

最新稳定版本:v2.0.0

Composer 安装命令:

composer require tintnaingwin/email-checker

包简介

Laravel Package To Validate If An Email Address Exists Without Sending An Email

README 文档

README

Latest Version on Packagist Software License Total Downloads

Notice - That extracts the MX records from the email address and connect with the mail server to make sure the mail address accurately exist. So it may be slow loading time in local and some co-operate MX records take a long time.

You can install the package via composer:

composer require tintnaingwin/email-checker

The package will automatically register itself.

Translations

If you wish to edit the package translations, you can run the following command to publish them into your resources/lang folder

php artisan vendor:publish --provider="Tintnaingwin\EmailChecker\EmailCheckerServiceProvider"

Features

This package supports:

  • Validate with SMTP
  • Support for Disposable Email

Usage

Form Request Validation

To add 'email_checker' at email attribute

    // [your site path]/app/Http/Requests/RegisterRequest.php
    public function rules()
    {
        return [
               'name' => 'required|string|max:255',
               'email' => 'required|string|email|max:255|unique:users|email_checker',
               'password' => 'required|string|min:6|confirmed',
        ];
    }

In a RegisterController

    // [your site path]/app/Http/Controllers/Auth/RegisterController.php
    protected function validator(array $data)
    {
        return Validator::make($data, [
            'name' => ['required', 'string', 'max:255'],
            'email' => 'required|string|email|max:255|unique:users|email_checker',
            'password' => ['required', 'string', 'min:8', 'confirmed'],
        ]);
    }

Using Rule Objects

    use TintNaingWin\EmailChecker\Rules\EmailExist;

    $request->validate([
        'email' => ['required', 'string', 'email', 'max:255', 'unique:users', new EmailExist],
    ]);

Usage With Facade

You can also check check email manually:

// reture boolean
EmailChecker::check('me@example.com');

Testing

Run the tests with:

composer test

Credit

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security

If you discover any security-related issues, please email amigo.k8@gmail.com instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 64.24k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 55
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 55
  • Watchers: 2
  • Forks: 18
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-25