We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 256af7e commit 131061cCopy full SHA for 131061c
.changeset/tall-symbols-enjoy.md
@@ -0,0 +1,5 @@
1
+---
2
+"@obosbbl/validation": patch
3
4
+
5
+add checksum validation of Swedish organization numbers. Previously we only checked the length of the number.
packages/validation/src/se.ts
@@ -81,7 +81,7 @@ export function validateOrganizationNumber(
81
value = stripFormatting(value);
82
}
83
84
- return /^\d{10}$/.test(value);
+ return /^\d{10}$/.test(value) && mod10(value);
85
86
87
type NationalIdentityNumberFormat = 'short' | 'long';
0 commit comments