Giter Site home page Giter Site logo

Comments (6)

yolk avatar yolk commented on July 17, 2024

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.

kirichkov avatar kirichkov commented on July 17, 2024

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.

yolk avatar yolk commented on July 17, 2024

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.

kirichkov avatar kirichkov commented on July 17, 2024

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.

kirichkov avatar kirichkov commented on July 17, 2024

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.

yolk avatar yolk commented on July 17, 2024

Just merged it in and released it with valvalt 0.5

Thx again!

from valvat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.