Comments (6)
Hi Kirichkov,
first thx for your locale contribution! I just pulled it in and release v0.4.5 of valvat.
Could you provide some example code that validates bulgarian VAT numbers? What I don't understand at the moment: what additional functionality does it provide compared to the existing regular expressions?
I could imagine integrating something like this if it helps in validating bulgarian VAT numbers offline; but I don't want to add functionality to validate other ID numbers. I think valvat should focus on european VAT numbers only.
Thanks anyway & best to Bulgaria!
from valvat.
Currently any 9 or 10 digit number will be considered valid if it's given as a bulgarian ID. The bulgarian ID numbers (both company and personal) have a checksum integrated. When you generate and compare the checksum digit (the last digit of the ID) you can have a "higher certainty" that the given number is indeed valid. Of course it won't mean that the ID number actually exists.
I'll port my code and make a pull request and you can decide whether or how to integrate the code.
from valvat.
Thanks for the details and working on a pull request.
I just started working on a checksum branch, which implements some checksum-checks for several countries, based on algorhytms I found at http://www.pruefziffernberechnung.de/U/USt-IdNr.shtml (only german) and http://sima.cat/nif.php
The work is not complete and I have to perform some additional tests against local data to verify the correctness of this new feature before merging it to the master branch. But maybe you can add your check for bulgarian numbers to this branch via a pull request?
Thx!
from valvat.
I shall! I will try to adhere to your coding as much as I can. I'll probably have some time over the weekend to implement it.
from valvat.
I just sent a pull request and I want to make a quick note that the algorithm for generating the checksum of Bulgarian company IDs mentioned in http://sima.cat/nif.php is wrong.
from valvat.
Just merged it in and released it with valvalt 0.5
Thx again!
from valvat.
Related Issues (20)
- Periodic Savon::UnknownOperationError when validating VAT HOT 8
- Warning on Ruby 3.x: `character class has duplicated range` HOT 1
- `Savon::HTTPError` not handled gracefully HOT 2
- Support for Apple Distribution International in Italy HOT 4
- The given SOAPAction checkVat does not match an operation HOT 1
- Support for Northern Ireland (XI) HOT 1
- No response returned as of 2022 HOT 13
- Missing dependency rexml? HOT 1
- Add caching HOT 4
- Equality for Valvat objects HOT 1
- When do you expect to bump the gem version so we can use updated Cyprus regular expression? HOT 1
- Add proxy option
- DE country almost always return MS_MAX_CONCURRENT_REQ HOT 1
- Swiss (CH) VAT validation and lookup HOT 2
- Handeling different response data HOT 1
- Cannot validate HOT 5
- How to test errors? HOT 1
- Portuguese translation failing due to missing space on locale yml file HOT 1
- Incompatibility with Ruby 3.0.0 HOT 11
- Implement VAT validation for GB VAT numbers HOT 20
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from valvat.