worksome/uk-tax-code-validator

A package for validating tax codes in UK
612,276 10
Install
composer require worksome/uk-tax-code-validator
Latest Version:v1.9.0
PHP:^8.4
Laravel:12 · 13
Older releases:8 – 11
License:MIT
Last Updated:Mar 2, 2026
Links: GitHub  ·  Packagist
Maintainer: owenvoke

UK Tax Code validator

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.

Usage

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

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

$response->isValid();

Laravel

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

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

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

644,549,754 9,698
laravel/framework

The Laravel Framework.

598,760,099 34,966
laravel/tinker

Powerful REPL for the Laravel framework.

507,193,856 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

423,477,751 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

399,241,428 4,660

Version History

Version Released PHP Laravel License
v1.9.0 ^8.4 ^12.0 || ^13.0 MIT
v1.8.1 ^8.3 ^11.0 || ^12.0 MIT
v1.8.0 ^8.3 ^11.0 || ^12.0 MIT
v1.7.0 ^8.3 ^11.0 || ^12.0 MIT
v1.6.1 ^8.2 ^11.0 MIT