This package can be used to validate EU VAT identification numbers such as DE123456789
.
You can install the package using composer:
composer require codelayer/laravel-vat-validator
If you wish to customize the package's translation, you can publish the translation files:
php artisan vendor:publish --provider="Codelayer\VatValidator\VatValidatorServiceProvider"
Simply use the VatFormat
rule inside your rules array, e.g. in a form request:
use Codelayer\VatValidator\Rules\VatFormat;
public function rules()
{
return [
'vat_number' => ['required', new VatFormat()],
];
}
codelayer is a web development agency based in Karlsruhe, Germany. This package was developed for use in our product likvi.
The MIT License (MIT).