Skip to content

Commit 904a69f

Browse files
chore: Update version for release (#32)
1 parent b1c13ed commit 904a69f

File tree

5 files changed

+47
-50
lines changed

5 files changed

+47
-50
lines changed

.changeset/shy-heads-cross.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

.changeset/tall-symbols-enjoy.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/yummy-bottles-jump.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

packages/validation/CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,51 @@
11
# @obosbbl/validation
22

3+
## 0.3.0
4+
5+
### Minor Changes
6+
7+
- 1dfc896: add method `no/validateNationalIdentityNumber()`
8+
9+
Validates that the input is a valid Norwegian national identity number (either a fødselsnummer or a D-nummer).
10+
It validates the checksum and checks if the date of birth is valid.
11+
12+
```
13+
import { validateNationalIdentityNumber } from "@obosbbl/validation/no";
14+
15+
// Fødselsnummer
16+
validatePersonalIdentityNumber('21075417753') // => true
17+
18+
// D-nummer
19+
validatePersonalIdentityNumber('53097248016') // => true
20+
```
21+
22+
- 2491f32: add method `se/validateNationalIdentityNumber()`
23+
24+
Validates that the input is a valid Swedish national identity number (either a personnummer or a samordningsnummer).
25+
It validates the checksum and checks if the date of birth is valid.
26+
27+
It supports both short (10 digits) and long (12 digits) formats, with a separator if the `allowFormatting` option is set to `true`.
28+
29+
```
30+
import { validateNationalIdentityNumber } from "@obosbbl/validation/se";
31+
32+
// short
33+
validatePersonalIdentityNumber('YYMMDDXXXX') // true
34+
35+
// short with separator
36+
validatePersonalIdentityNumber('YYMMDD-XXXX', { allowFormatting: true }) // true
37+
38+
// long
39+
validatePersonalIdentityNumber('YYYYMMDDXXXX') // true
40+
41+
// long input, validate short format
42+
validatePersonalIdentityNumber('YYYYMMDDXXXX', { format: 'short' }) // false
43+
```
44+
45+
### Patch Changes
46+
47+
- b1c13ed: add checksum validation of Swedish organization numbers. Previously we only checked the length of the number.
48+
349
## 0.2.0
450

551
### Minor Changes

packages/validation/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@obosbbl/validation",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"description": "A collection of validation methods for OBOS",
55
"repository": {
66
"url": "https://github.com/code-obos/public-frontend-modules"

0 commit comments

Comments
 (0)