https://github.com/byonchev/zf2-kickbox
Zend Framework 2 Module that provides email validation via http://kickbox.io
https://github.com/byonchev/zf2-kickbox
Last synced: 2 months ago
JSON representation
Zend Framework 2 Module that provides email validation via http://kickbox.io
- Host: GitHub
- URL: https://github.com/byonchev/zf2-kickbox
- Owner: byonchev
- License: mit
- Created: 2015-10-30T09:12:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-08T09:02:51.000Z (almost 9 years ago)
- Last Synced: 2023-08-21T08:29:49.002Z (almost 2 years ago)
- Language: PHP
- Size: 14.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ZF2Kickbox is a module that provides **Zend Framework 2** validator for email verification using http://kickbox.io
# Installation
1. Add ```"byonchev/zf2-kickbox": "dev-master"``` to your ```composer.json``` and run ```php composer.phar update```
2. Add ```ZF2Kickbox``` to your ```application.config.php```:
```php
[
...
'ZF2Kickbox'
]
...
];
```# Usage
*First, you will need to get an API key from https://kickbox.io/app/api/settings after creating an account (if you don't have one already)*
1. Programmatic way
```php
add(new Element('email'));
$inputFilter = new InputFilter();
$input = new Input('email');
$kickboxValidator = new Kickbox(['apiKey' => 'xxxxxxxxxxxxxxxxx']);
$input->getValidatorChain()->attach($kickboxValidator);$inputFilter->add($input);
$this->setInputFilter($inputFilter);
}
}
```