Download the PHP package rocketfellows/country-vat-format-validator-interface without Composer
On this page you can find all versions of the php package rocketfellows/country-vat-format-validator-interface. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package country-vat-format-validator-interface
Country vat format validator interface
This component provides interface for implementing vat format validators for different countries.
Consist of:
- CountryVatFormatValidatorInterface - main interface for country vat format validator.
- CountryVatFormatValidator - abstract country vat format validator, a class that enforces an interface contract.
- CountryVatFormatEmptinessValidator - simple country vat format validator, example of implementation CountryVatFormatValidatorInterface, also provides only emptiness validation if for some country format not essential for some reason.
- CountryVatFormatValidators - CountryVatFormatValidatorInterface tuple implementation.
Installation
CountryVatFormatValidatorInterface description
CountryVatFormatValidatorInterface has one function isValid that takes string vat number as parameter. Interface implementations must handle inner exceptions and throws exceptions:
- CountryVatFormatValidationException
CountryVatFormatValidator description
CountryVatFormatValidator enforces an CountryVatFormatValidatorInterface contract, handling all exceptions and throws CountryVatFormatValidationException. Inheritors must implement abstract function isValidFormat wherein all validation must be written.
Example of inheritor: CountryVatFormatEmptinessValidator
CountryVatFormatEmptinessValidator description
CountryVatFormatEmptinessValidator simple country vat format validator, example of implementation CountryVatFormatValidatorInterface. Also provides only emptiness validation if for some country format not essential for some reason.
May serve as an example of other country vat format validators implementations.
CountryVatFormatValidators description
CountryVatFormatValidators - CountryVatFormatValidatorInterface tuple implementation. Represents an immutable tuple of objects of type CountryVatFormatValidatorInterface.
Contributing
Welcome to pull requests. If there is a major changes, first please open an issue for discussion.
Please make sure to update tests as appropriate.