-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Conversation
public function testIfTaxIdCanReturnData() | ||
{ | ||
$vatId = $this->faker->vatId(); | ||
$this->assertRegExp('/^IT{12}[0-9]$/', $vatId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know exactly how the regexify
method works, but doesn't this match only ITTTTTTTTTTTT[0-9]
?
Sorry if I'm missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ops it is a mistake i fix it now!
Tnks
I fixed the mistake |
*/ | ||
public static function vatId() | ||
{ | ||
return static::regexify('/^IT[0-9]{12}$/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quoting from https://en.wikipedia.org/wiki/VAT_identification_number :
11 digits (the first 7 digits is a progressive number, the following 3 means the province of residence, the last digit is a check number)
*/ | ||
public static function vatId() | ||
{ | ||
return static::regexify('/^IT[0-9]{11}$/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regexify
is very slow, use numerify
instead.
You should add a mention of the new providers in the Readme, under the "Locales" section. |
Travis fail in HHVM build
|
Italian Vat id and Tax id support
Thanks! |
Italian TaxId (Codice fiscale) https://it.wikipedia.org/wiki/Codice_fiscale
Italian VatId (Partita iva) https://it.wikipedia.org/wiki/Partita_iva