Skip to content

Commit b5b3645

Browse files
author
Venelin Manchev
committed
doc(readme): usage examples
1 parent ed3de19 commit b5b3645

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@
22

33
Validate a VAT number against the official European Commission VIES VAT number validation SOAP service.
44

5+
## Prerequisites
6+
1. PHP version 7 and above.
7+
2. php7.x-soap extension
8+
59
## How to install
610

11+
<pre>
712
composer require "toxicdigital/vat-validator"
13+
</pre>
814

915
## How to use
1016

1117
<pre>
12-
<?php
1318

1419
use Toxic\Validator\Vat as VatValidator;
1520

@@ -21,4 +26,15 @@ $validator->isValid("XY123456789");
2126
//If VAT number is valid, company info is available
2227
$validator->getCompany();
2328

29+
/*
30+
* Toxic\Validator\Vat\Company Object
31+
* (
32+
* [name] => John Doe
33+
* [address] => 123 Main St, Anytown, UK
34+
* [vatNumber] => 100
35+
* [countryCode] => GB
36+
* [valid] => true
37+
* )
38+
*/
39+
2440
</pre>

0 commit comments

Comments
 (0)