r/webdev • • 1h ago

[ Removed by moderator ]

/r/webdev/comments/1ybt72d/removed_by_moderator/

[removed] — view removed post

0 Upvotes

10 comments sorted by

View all comments

4

u/jhartikainen 1h ago

I'm not sure how you're claiming to validate VAT IDs and such, when these numbers are on a per-registration basis. Just because the number is valid by pattern doesn't mean it's actually valid.

1

u/Worried_Librarian_79 1h ago

The library distinguishes between structural validation and existence verification.

Structural validation goes beyond pattern matching. Depending on the identifier, it checks length, format, checksums, valid component ranges, dates and country-specific rules.

However, you are right that passing these checks does not prove that an identifier has actually been issued, is currently registered or belongs to a particular person or company.

For EU VAT numbers, the library provides optional online verification through VIES.