Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Validate Danish VAT Numbers (CVR) in Node.js

Originally published at vatnode.dev . The version on vatnode.dev is the canonical source — refer to it for the latest content. A Danish VAT number is DK followed by 8 digits, and in the usual case those digits are the business’s CVR number. Check the format, run the mod-11 check as a typo hint, then let VIES decide, because Denmark has no national fallback when the VIES node is down. This post…

A Danish VAT number, also known as CVR (Central Business Register), begins with the prefix DK followed by 8 digits. The VATNode API in Node.js allows for the validation of this format, pattern, and a mod-11 check for typos. The API does not perform the mod-11 check, so it is recommended to do so on your side to catch any mistyped digits before sending a request to the VIES service.

The example provided demonstrates normalising a Danish VAT ID, checking if it matches the pattern, calculating the weighted sum for the mod-11 check, and finally making a request to the VATNode API with a sample VAT ID.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

More from Dev.to on urgent.news

Report a problem with this story

Get the day's news by email. Daily, weekly or monthly. Sign up

More in Tech

EDUCATION INNOVATION: New career guidance app helps matriculants choose their next step

A free mobile app developed by a University of Cape Town student is helping learners in under-resourced communities explore courses they qualify for, understand their career interests and see how…

  • Guideian EDU app helps South African matriculants choose careers
  • Learners input marks, complete psychometric test for personalized recommendations
  • App aims to expand to small towns and partner with schools for equal access

More from Wednesday, 2 December 2026 →