-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
Describe the bug
The French VAT regular expression is invalid. The number begins with the FR code, followed by a two-digit key and the company's nine-digit SIREN number. For example, here are two intra-community VAT numbers: FR 89 128370925 and FR 10 123456789.
With the current regex, I can create a VAT number with the following format: FR_9128370925
Examples
Regular expression with problem: FR: str => /^(FR)?\w{2}\d{9}$/.test(str),
Solution: /^(FR)([A-Z0-9]{2}\d{9})$/