ASP.NET MVC 5: Validating a VAT with ValidationAttribute and EU checkVatService

Validating a VAT with ValidationAttribute and EU checkVatService can be done very easily in a different assembly for using it in all your projects.
Just create a new project (I named it VAT) and follow these steps!

Step 1, add the service refenerence to your project
Right click on References and choose Service Reference. Paste this address http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl type your namespace (I use checkVatService) and hit OK
Continue reading

Advertisements