Download the PHP package eventix/eu-vat without Composer
On this page you can find all versions of the php package eventix/eu-vat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eventix/eu-vat
More information about eventix/eu-vat
Files in eventix/eu-vat
Package eu-vat
Short Description Eu VAT formatting and validation Laravel package
License MIT
Homepage https://eventix.io/
Informations about the package eu-vat
EU Vat
This Laravel package enables the formatting and validation of (EU) VAT numbers.
For validation it uses the endpoints of the European Commission's VAT Information Exchange Service (VIES)
Table of Contents
- Installation
- Usage
- Testing
- Contributing
Installation
Via Composer
Usage
When the package is included in a Laravel project, composer autoload functionality has automatically discovered a Service Provider. This will extend the Laravel Validator with a validation rule (vat_number).
Also an alias for a Facade is registered. This facade (EuVat) will enable manual formatting and validation for vat numbers.
Supported countries
Vat Numbers
Validator
Validates the vat number by inferring its country
Validates the vat number for a given country
Validates the vat number for a country determined by another field
Validation ONLY when the vat number changes
If the value does not change... it should already be valid. This will reduce the calls to VIES. Note: The validation rule needs the original value for this to work.
Validates a changed vat number for an inferred country
Validates a changed vat number for a country determined by another field
Validates a changed vat number for a given country
Testing
Note, for testing the project needs to be cloned and all dependencies installed first.
License
Please see License File.
No liability, implementor is responsible for reviewing code!
Issues
Please open an issue.
Contributing
Please contribute using Github Flow. Fork the project, create a branch, add commits, and open a pull request.
Opportunities
- Test coverage is not a 100% yet.
Potentials
- Opportunities for localized country names
- Opportunities for 3 char country codes
- Opportunities for country/ies outside the EU