amuck-landowner

EU VAT number validator

SentinelTower

New Member
Hi all,

I have written a PHP class to validate Eu VAT Numbers. It queries the VIES SOAP API and validates the format beforehand.

There is a set of regular expressions to validate the number and it would be great if companies with a valid EU VAT number could check if their number is correctly validated.

The project is here : https://github.com/suikatech/EuVatValidator

It runs on PHP, and you can use the demo file to validate your number using the form included.

Please tell your country in your feedbacks.

Thanks !
 

HalfEatenPie

The Irrational One
Retired Staff
Looks great!  

Out of curiosity, possible to make this into something like a WHMCS extension for easy integration?  
 

William

pr0
Verified Provider
What is 'EL'? No such country code.

case "EL": if (preg_match("/^EL[0-9]{9}/", $vatNumberFull) != 1) { return false; } break;
 
Last edited by a moderator:

SentinelTower

New Member
Top
amuck-landowner