Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Italian validator assumes numeric input #67

Closed
willemstuursma opened this issue Jul 23, 2019 · 3 comments
Closed

Italian validator assumes numeric input #67

willemstuursma opened this issue Jul 23, 2019 · 3 comments

Comments

@willemstuursma
Copy link

We got a nice error:

Stack trace:
#0 vendor/dragonbe/vies/src/Vies/Validator/ValidatorIT.php(52): {closure}(2, 'A non-numeric v...', '/data/www/...', 52, Array)
#1 vendor/dragonbe/vies/src/Vies/Vies.php(305): DragonBe\Vies\Validator\ValidatorIT->validate('AA123456789')
#2 vendor/dragonbe/vies/src/Vies/Vies.php(242): DragonBe\Vies\Vies->validateVatSum('IT', 'AA123456789')
#3 application/classes/supplier/vies.php(72): DragonBe\Vies\Vies->validateVat('IT', 'AA123456789', '..', '...')

Note that the number was invalid to start with, but a ctype_digit check would have prevented an error from being triggered. It tries to do some math calculation on a non-digit.

@willemstuursma
Copy link
Author

Same with the ValidatorHR class.

DragonBe added a commit that referenced this issue Aug 19, 2019
Fixing bug #67 reported by @willemstuursma regarding validating numeric only VAT ID's with non-numeric values.
@DragonBe
Copy link
Owner

Hi @willemstuursma, my apologies for my delayed response.

I was able to fix the reported in PR #68 and have release 2.1.7 ready for you to use. Please update your composer package.

@willemstuursma
Copy link
Author

Hi @willemstuursma, my apologies for my delayed response.

No problem! Thank you for resolving!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants