{"id":22705673,"url":"https://github.com/tox82/vatnumbervalidator","last_synced_at":"2025-03-29T20:25:56.277Z","repository":{"id":57072219,"uuid":"448300314","full_name":"ToX82/VatNumberValidator","owner":"ToX82","description":"A simple, no dependency formal VAT number validator ","archived":false,"fork":false,"pushed_at":"2023-07-31T13:13:16.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-04T21:19:08.235Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ToX82.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-15T14:29:02.000Z","updated_at":"2023-12-13T14:40:48.000Z","dependencies_parsed_at":"2024-12-10T09:12:46.924Z","dependency_job_id":"7a30e693-5bec-4fe9-9663-e1b4726d3bd3","html_url":"https://github.com/ToX82/VatNumberValidator","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"f24eb956ce32b66c4e56b36242b8d332d21729c3"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToX82%2FVatNumberValidator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToX82%2FVatNumberValidator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToX82%2FVatNumberValidator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToX82%2FVatNumberValidator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ToX82","download_url":"https://codeload.github.com/ToX82/VatNumberValidator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246239606,"owners_count":20745738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-10T09:12:35.932Z","updated_at":"2025-03-29T20:25:56.246Z","avatar_url":"https://github.com/ToX82.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VAT validator\n## A formal VAT number validator\n\nIt's not a full validation tool, it just checks that the VAT number is formally valid: eg. 11 chars, digits only, etc.\nIt's built using these rules:\n * https://www.gov.uk/guidance/vat-eu-country-codes-vat-numbers-and-vat-in-other-languages\n * https://en.wikipedia.org/wiki/VAT_identification_number\n\nIt requires PHP \u003e= 7.0.\n\nInstallation:\n```shell\ncomposer require tox82/vatnumber-validator\n```\n\nUsage\n-----------\n\nJust load the VatNumber class and execute a check, passing the country code and VAT code as parameters, \nand it will return a boolean value. True for valid VAT number, false for invalid.\n\n\n```php\nuse Tox82\\VatNumber;\n\n...\n\necho VatNumber::check('FR', '12345678901'); // true\necho VatNumber::check('HU', '12345678'); // true\necho VatNumber::check('PT', '123456789'); // true\necho VatNumber::check('SE', '123456789012'); // true\n\necho VatNumber::check('AT', 'U123456780'); // false because of invalid number's length\necho VatNumber::check('MK', 'AA4032013544513'); // false because of  invalid characters\n```\n\nTODO\n-----------\n\nAdd specific, more robust validation for each country, when available. Eg. check digits. prefixes, suffixes, etc.\n\nResources\n---------\n * [Report issues](https://github.com/ToX82/VatNumberValidator/issues)\n * [Send Pull Requests](https://github.com/ToX82/VatNumberValidator/pulls)\n * [Check the main repository](https://github.com/ToX82/VatNumberValidator)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftox82%2Fvatnumbervalidator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftox82%2Fvatnumbervalidator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftox82%2Fvatnumbervalidator/lists"}