Laravel 12 – 13
PHP 8.4+
Low commit activity in last 18 months
A long-lived project that still receives updates
A package for validating tax codes in UK
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

^7.10 || ^8.1.1
^10.1 || ^11.0
worksome/coding-style
^3.4

Runtime

thecodingmachine/safe
^3.0
^12.0 || ^13.0
^12.0 || ^13.0
 Project Readme

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();