jimmlog / yii2-disposable-email-validator
Yii2 disposable email validator
Installs: 5 301
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- php: >=5.4.0
- ext-json: *
- nojacko/email-data-disposable: @dev
- yiisoft/yii2: @dev
This package is auto-updated.
Last update: 2024-10-29 00:43:46 UTC
README
This library contains validator for block email from disposable domains with Yii framework 2.0.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist jimmlog/yii2-disposable-email-validator
or add
"jimmlog/yii2-disposable-email-validator": "@stable"
to the require section of your composer.json.
How To Use
This validator is additional validator for Yii2 core "email" validator. Example of use:
class FormModel extend \yii\base\Model
{
...
/**
* @inheritdoc
*/
public function rules()
{
...
[['email'], 'email'],
[['email'], \jimmlog\yii2\DisposableEmailValidator::className()],
...
}
...
}
License
The MIT License (MIT). See LICENSE file.