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

feat(isTaxID): Add EU-UK TIN validation #1446

Merged
merged 42 commits into from
Nov 24, 2020

Commits on Aug 25, 2020

  1. feat(isTaxID): Added de-AT locale

    * Added TIN validation for Austrian numbers
    * Added source of validation algorithms to header
    tplessas committed Aug 25, 2020
    Configuration menu
    Copy the full SHA
    bd2916b View commit details
    Browse the repository at this point in the history
  2. test(isTaxID): Added unit tests for de-AT TINs

    * Refactored TIN unit tests to support more locales
    * Added unit tests for de-AT TINs
    * Added comments to isTaxID.js to explain behaviour of deAtCheck(tin)
    tplessas committed Aug 25, 2020
    Configuration menu
    Copy the full SHA
    c1f94b2 View commit details
    Browse the repository at this point in the history
  3. feat(isTaxID): Added el-GR locale

    * Added TIN validation for Greek numbers
    * Added relevant tests
    tplessas committed Aug 25, 2020
    Configuration menu
    Copy the full SHA
    fc8415f View commit details
    Browse the repository at this point in the history
  4. feat(isTaxID): Added en-GB locale

    * Added TIN validation for UK numbers
    * Added relevant tests
    tplessas committed Aug 25, 2020
    Configuration menu
    Copy the full SHA
    aafde10 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2020

  1. fix(isTaxID): Sanitize TINs before validity testing

    * Certain EU TINs might be entered with special characters which
    should not affect their validity/be omitted according to the
    specification. Such TINs are now sanitized before running checks
    in isTaxID(str, locale).
    * Removed en-GB validity check function (not needed, case already
    covered in isTaxID(str, locale).
    * Updated/simplified structure of regexes
    * Updated de-AT tests as some previously invalid TINs are now
    considered valid in line with the specification.
    tplessas committed Aug 26, 2020
    Configuration menu
    Copy the full SHA
    902dfed View commit details
    Browse the repository at this point in the history
  2. feat(isTaxID): Added fr/nl-BE locales

    * Added TIN validation for Belgian numbers
    * Added relevant tests
    * Added local TIN names and validation scope
    (person/entity) to comments
    tplessas committed Aug 26, 2020
    Configuration menu
    Copy the full SHA
    1ff1df1 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2020

  1. refactor(isTaxID): Added locale aliases

    * Countries with more than one locale should now have only one
    entry in the taxIdFormat and taxIdCheck objects, all others added
    as aliases below the objects. This should help avoid repetition.
    * Refactored nl-BE as alias to fr-BE
    * Renamed frNlBeCheck to frNlCheck to reflect changes.
    tplessas committed Aug 27, 2020
    Configuration menu
    Copy the full SHA
    8e479d2 View commit details
    Browse the repository at this point in the history
  2. feat(isTaxID): Added fr-FR locale

    * Added validation for French TINs
    * Added relevant tests
    tplessas committed Aug 27, 2020
    Configuration menu
    Copy the full SHA
    da20851 View commit details
    Browse the repository at this point in the history
  3. feat(isTaxID): Added el-CY locale

    * Added validation for Cypriot TINs
    * Added relevant tests
    * Added tests for previously uncovered cases (calling isTaxID
    without a locale, frBeCheck invalid checksum)
    tplessas committed Aug 27, 2020
    Configuration menu
    Copy the full SHA
    6f39782 View commit details
    Browse the repository at this point in the history
  4. feat(isTaxID): Added hu-HU locale

    * Added validation for Hungarian TINs
    * Added relevant tests
    * Refactored return statements to be
    one-liners where possible
    tplessas committed Aug 27, 2020
    Configuration menu
    Copy the full SHA
    77cf993 View commit details
    Browse the repository at this point in the history
  5. refactor(isTaxID): Prepare to support more sanitization regexes

    Different locales might have specific needs wrt acceptable symbols
    in TINs- in some all are omitted during validation, while others
    only allow to skip a subset.
    
    A new object `sanitizeRegexes` has replaced the previous array, where
    locale-specific skippable symbol classes are to be placed. When all
    symbols can be omitted the new variable `allsymbols` is referenced.
    
    Aliases have also been added for the new object in line with the
    others and the isTaxID function checks for the locale's inclusion in
    `sanitizeRegexes`.
    tplessas committed Aug 27, 2020
    Configuration menu
    Copy the full SHA
    11cb416 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2020

  1. feat(isTaxID): Add de-DE locale

    * Add TIN validation for German numbers
    * Add relevant tests
    tplessas committed Aug 29, 2020
    Configuration menu
    Copy the full SHA
    ab924d8 View commit details
    Browse the repository at this point in the history
  2. feat(isTaxID): Add hr-HR locale

    * Moved de-DE check digit calculation routine
    to new function `iso7064Check()` to be used
    for other conforming locales.
    * Add TIN validation for Croatian numbers
    * Add relevant tests
    * Refactor deDeCheck() to use iso7064Check()
    tplessas committed Aug 29, 2020
    Configuration menu
    Copy the full SHA
    59ddf52 View commit details
    Browse the repository at this point in the history
  3. feat(isTaxID): Add bg-BG locale

    * Add TIN validation for Bulgarian numbers
    * Add relevant tests
    tplessas committed Aug 29, 2020
    Configuration menu
    Copy the full SHA
    237a46f View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2020

  1. feat(isTaxID): Add cs-CZ locale

    * Add TIN validation for Czech numbers
    * Add relevant tests
    tplessas committed Sep 3, 2020
    Configuration menu
    Copy the full SHA
    cdf0ade View commit details
    Browse the repository at this point in the history
  2. fix(isTaxID): Add el-GR first digit validation

    * Add validation for first digit of Greek TINs
    * Refactor el-GR tests
    * Add info for testable en-GB TINs
    tplessas committed Sep 3, 2020
    Configuration menu
    Copy the full SHA
    afb51a9 View commit details
    Browse the repository at this point in the history
  3. feat(isTaxID): Add sk-SK locale

    * Add TIN validation for Slovakian numbers
    * Add relevant tests
    tplessas committed Sep 3, 2020
    Configuration menu
    Copy the full SHA
    110b24b View commit details
    Browse the repository at this point in the history
  4. feat(isTaxID): Add dk-DK locale

    * Add TIN validation for Danish numbers
    * Add relevant tests
    tplessas committed Sep 3, 2020
    Configuration menu
    Copy the full SHA
    6c83200 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2020

  1. feat(isTaxID): Add et-EE locale

    * Add TIN validation for Estonian numbers
    * Add relevant tests
    tplessas committed Sep 4, 2020
    Configuration menu
    Copy the full SHA
    2b3068f View commit details
    Browse the repository at this point in the history
  2. feat(isTaxID): Add lt-LT locale

    * Add TIN validation for Lithuanian numbers (as alias of et-EE)
    * Add relevant tests
    tplessas committed Sep 4, 2020
    Configuration menu
    Copy the full SHA
    f06637c View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2020

  1. feat(isTaxID): Add fi-FI locale

    * Add TIN validation for Finnish numbers
    * Add relevant tests
    tplessas committed Sep 10, 2020
    Configuration menu
    Copy the full SHA
    84b306f View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2020

  1. feat(isTaxID): Add it-IT locale

    * Add TIN validation for Italian numbers
    * Add relevant tests
    tplessas committed Sep 15, 2020
    Configuration menu
    Copy the full SHA
    fa9dfd6 View commit details
    Browse the repository at this point in the history
  2. feat(isTaxID): Add en-IE locale

    * Add TIN validation for Irish numbers
    * Add relevant tests
    tplessas committed Sep 15, 2020
    Configuration menu
    Copy the full SHA
    6e5ddf6 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2020

  1. feat(isTaxID): Add lv-LV locale

    * Add TIN validation for Latvian numbers
    * Add relevant tests
    tplessas committed Sep 16, 2020
    Configuration menu
    Copy the full SHA
    606219a View commit details
    Browse the repository at this point in the history
  2. refactor(isTaxID): Remove unneeded parseInt() calls

    * Remove parseInt() calls in year extraction procedures of functions
    to improve performance and readability
    tplessas committed Sep 16, 2020
    Configuration menu
    Copy the full SHA
    66d1021 View commit details
    Browse the repository at this point in the history
  3. refactor(isTaxID): Add Luhn validation function

    * Add luhnCheck() to be used by conforming locale TINs
    * Refactor deAtCheck() to use luhnCheck()
    tplessas committed Sep 16, 2020
    Configuration menu
    Copy the full SHA
    77e67c5 View commit details
    Browse the repository at this point in the history
  4. refactor(isTaxID): Add reverse multiplication function

    * Add reverseMultiplyAndSum() to support new locale check functions
    tplessas committed Sep 16, 2020
    Configuration menu
    Copy the full SHA
    d4ac410 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2020

  1. feat(isTaxID): Add sv-SE locale

    * Add TIN validation for Swedish numbers
    * Add relevant tests
    tplessas committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    e786cc6 View commit details
    Browse the repository at this point in the history
  2. feat(isTaxID): Add nl-NL locale

    * Add TIN validation for Dutch numbers
    * Add relevant tests
    * Refactor enIeCheck() to use reverseMultiplyAndSum()
    tplessas committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    9142f5b View commit details
    Browse the repository at this point in the history
  3. feat(isTaxID): Add pt-PT locale

    * Add TIN validation for Portugese numbers
    * Add relevant tests
    tplessas committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    f6ab3b2 View commit details
    Browse the repository at this point in the history
  4. feat(isTaxID): Add sl-SI locale

    * Add TIN validation for Slovenian numbers
    * Add relevant tests
    tplessas committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    72c6848 View commit details
    Browse the repository at this point in the history
  5. feat(isTaxID): Add es-ES locale

    * Add TIN validation for Spanish numbers
    * Add relevant tests
    tplessas committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    ad0e872 View commit details
    Browse the repository at this point in the history
  6. feat(isTaxID): Add ro-RO locale

    * Add TIN validation for Romanian numbers
    * Add relevant tests
    tplessas committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    34b3f7b View commit details
    Browse the repository at this point in the history
  7. feat(isTaxID): Add mt-MT locale

    * Add TIN validation for Maltese numbers
    * Add relevant tests
    tplessas committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    592ebc5 View commit details
    Browse the repository at this point in the history
  8. feat(isTaxID): Add pl-PL locale

    * Add TIN validation for Polish numbers
    * Add relevant tests
    tplessas committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    85e8185 View commit details
    Browse the repository at this point in the history
  9. refactor(isTaxID): Add any case support

    * Add support for both uppercase and lowercase letters
    where not specifically defined in the DG TAXUD document
    tplessas committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    01ea521 View commit details
    Browse the repository at this point in the history
  10. chore(isTaxID): Add Verhoeff validation function

    * Add verhoeffCheck() to be used by future locale TINs
    tplessas committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    4b091a0 View commit details
    Browse the repository at this point in the history
  11. feat(isTaxID): Add fr/lb-LU locale

    * Add TIN validation for Luxembourgish numbers
    * Add relevant tests
    tplessas committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    c231074 View commit details
    Browse the repository at this point in the history
  12. docs(README): Update isTaxID() description

    * Add supported locale list and info message to isTaxID() description
    tplessas committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    229a15d View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2020

  1. remove(isTaxID): Remove codice catastale validation

    * Remove codice catastale validation subroutine from it-IT
    (to be included in another upstream PR) for further review.
    tplessas committed Oct 19, 2020
    Configuration menu
    Copy the full SHA
    b725ca3 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2020

  1. refactor(isTaxID): Move helper validation algorithms

    * General-purpose validation algorithms have benn moved
    to `src/lib/util/algoritms.js` to support further use.
    * Validation algorithms have been refactored to use strings
    as input
    * isTaxID has been refactored to use `algorithms.js`
    tplessas committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    2df2d18 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2020

  1. Configuration menu
    Copy the full SHA
    bc9ef38 View commit details
    Browse the repository at this point in the history