Skip to content

.NET Library for parsing, validation and reformatting standart numbers

License

Notifications You must be signed in to change notification settings

michalderdak/NumberChecker

Repository files navigation

VATNumberChecker

.NET Library for parsing, validation and reformatting standart numbers

Currently supports EU VAT numbers only

Usage

  //VAT number can be  supplied either with or without coutry prefix
  VatNumber vatNumber = Validate("vatnumber", Country.DK); 
  
  vatNumber.ToString(); //Returns EU country prefix + VAT number - DK12345678
  vatNumber.Number //Returns actual VAT number without country prefix
  vatNumber.EUCountry //Returns enum EUCountry which indicates country prefix for VAT number
  

Validate function can raise 4 different exceptions

  InvalidChecksumException()
  InvalidCountryException()
  InvalidFormatException()
  InvalidLengthException()
  

About

.NET Library for parsing, validation and reformatting standart numbers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages