https://github.com/oefenweb/cakephp-vat-number-check
A VAT number check Plugin for CakePHP
https://github.com/oefenweb/cakephp-vat-number-check
cakephp cakephp2 cakephp3 php plugin vat-number vat-validation
Last synced: 6 months ago
JSON representation
A VAT number check Plugin for CakePHP
- Host: GitHub
- URL: https://github.com/oefenweb/cakephp-vat-number-check
- Owner: Oefenweb
- License: mit
- Created: 2014-01-09T15:05:11.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-04-30T23:17:04.000Z (about 5 years ago)
- Last Synced: 2024-04-18T05:03:29.347Z (about 1 year ago)
- Topics: cakephp, cakephp2, cakephp3, php, plugin, vat-number, vat-validation
- Language: PHP
- Size: 133 KB
- Stars: 3
- Watchers: 5
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# VatNumberCheck plugin for CakePHP
[](https://travis-ci.org/Oefenweb/cakephp-vat-number-check)
[](https://travis-ci.org/Oefenweb/cakephp-vat-number-check)
[](https://codecov.io/gh/Oefenweb/cakephp-vat-number-check)
[](https://packagist.org/packages/oefenweb/cakephp-vat-number-check)
[](https://codeclimate.com/github/Oefenweb/cakephp-vat-number-check)
[](https://scrutinizer-ci.com/g/Oefenweb/cakephp-vat-number-check/?branch=master)## Requirements
* CakePHP 2.9.0 or greater.
* PHP 7.0.0 or greater.## Installation
Clone/Copy the files in this directory into `app/Plugin/VatNumberCheck`
## Configuration
Ensure the plugin is loaded in `app/Config/bootstrap.php` by calling:
```
CakePlugin::load('VatNumberCheck', ['routes' => true]);
```## Usage
### Model
Normalizes a VAT number:
```
$vatNumber = $this->VatNumberCheck->normalize($vatNumber);
```Checks a given VAT number:
```
$vatNumberValid = $this->VatNumberCheck->check($vatNumber);
```### Helper
Generates a VAT number check form field:
```
echo $this->VatNumberCheck->input('vat_number', ['label' => __('VAT number')]);
```