Skip to content

Commit

Permalink
Merge pull request #20 from spaze/spaze/invalid-chars-exception
Browse files Browse the repository at this point in the history
Invalid VAT id chars exception
  • Loading branch information
spaze committed Sep 24, 2020
2 parents 8ac4fea + 63280d4 commit 859c5e9
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 1,681 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/composer.lock export-ignore
/phpstan.neon export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# composer
/composer.lock
/phpunit.xml
/vendor/
phpunit.xml
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ if ($vatCalculator->shouldCollectEuVat('DE')) {

To validate your customers VAT numbers, you can use the `isValidVatNumber` method.
The VAT number should be in a format specified by the [VIES](https://ec.europa.eu/taxation_customs/vies/faqvies.do#item_11).
The given VAT numbers will be truncated and non relevant characters / whitespace will automatically be removed.
The given VAT numbers will be truncated and non relevant characters (`-`, `.`, `,`, whitespace) will automatically be removed.
If there are any invalid characters left, like non-latin letters for example, `InvalidCharsInVatNumberException` will be thrown.

This service relies on a third party SOAP API provided by the EU. If, for whatever reason, this API is unavailable a `VatCheckUnavailableException` will be thrown.

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
],
"require": {
"php": ">=7.3",
"ext-soap": "*",
"phpstan/phpstan": "^0.12.42"
"ext-soap": "*"
},
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.2",
"php-parallel-lint/php-console-highlighter": "^0.5.0",
"phpstan/phpstan": "^0.12.44",
"phpunit/php-timer": "1.0.*",
"phpunit/phpunit": "4.7.*",
"spaze/coding-standard": "^0.0.3"
Expand Down

0 comments on commit 859c5e9

Please sign in to comment.