Code of this validator is taken (with small changes like optimization or removing not needed elements) from THIS REPOSITORY. Super thank you guys, you did a great job.
This simple package helps you with validating Steuerliche Identifikationsnummer (German personal tax number) according to THIS OFFICIAL DOCUMENT.
The IdNr (or Steuer-IdNr) is a personal identification number that is assigned to individuals in Germany for tax purposes and is meant to replace the Steuernummer. The number consists of 11 digits and does not embed any personal information.
Sources:
- https://de.wikipedia.org/wiki/Steuerliche_Identifikationsnummer
- http://www.identifikationsmerkmal.de/
simple-de-taxid-validator is available as an npm package.
// with npm
npm i simple-de-taxid-validator
// with yarn
yarn add simple-de-taxid-validator
import { deTaxIdValidator } from 'simple-de-taxid-validator';
const { isValid } = deTaxIdValidator.validate(value);
const formattedTaxIdNumber = deTaxIdValidator.format(value);
This project is licensed under the terms of the MIT license.