A package for validating tax codes in UK

v1.6.0 2024-03-07 09:39 UTC

This package is auto-updated.

Last update: 2024-06-07 10:10:34 UTC


This package is for validating if a UK tax code is valid.
As there are many rules for when a UK tax code is valid, we needed a way to actually check this. This package contains all the rules for validating if the UK tax code is a valid or not.


For validating a tax code, you can simply run the following

$engine = new Engine();
$response = $engine->validate($taxCode);



The package does also contain a validation rule to be used with Laravel.

Validator::make($data, [
    'tax_code' => ['required', new UkTaxCode(),],