Skip to content

chore: Update version for release #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .changeset/shy-heads-cross.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tall-symbols-enjoy.md

This file was deleted.

26 changes: 0 additions & 26 deletions .changeset/yummy-bottles-jump.md

This file was deleted.

46 changes: 46 additions & 0 deletions packages/validation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# @obosbbl/validation

## 0.3.0

### Minor Changes

- 1dfc896: add method `no/validateNationalIdentityNumber()`

Validates that the input is a valid Norwegian national identity number (either a fødselsnummer or a D-nummer).
It validates the checksum and checks if the date of birth is valid.

```
import { validateNationalIdentityNumber } from "@obosbbl/validation/no";

// Fødselsnummer
validatePersonalIdentityNumber('21075417753') // => true

// D-nummer
validatePersonalIdentityNumber('53097248016') // => true
```

- 2491f32: add method `se/validateNationalIdentityNumber()`

Validates that the input is a valid Swedish national identity number (either a personnummer or a samordningsnummer).
It validates the checksum and checks if the date of birth is valid.

It supports both short (10 digits) and long (12 digits) formats, with a separator if the `allowFormatting` option is set to `true`.

```
import { validateNationalIdentityNumber } from "@obosbbl/validation/se";

// short
validatePersonalIdentityNumber('YYMMDDXXXX') // true

// short with separator
validatePersonalIdentityNumber('YYMMDD-XXXX', { allowFormatting: true }) // true

// long
validatePersonalIdentityNumber('YYYYMMDDXXXX') // true

// long input, validate short format
validatePersonalIdentityNumber('YYYYMMDDXXXX', { format: 'short' }) // false
```

### Patch Changes

- b1c13ed: add checksum validation of Swedish organization numbers. Previously we only checked the length of the number.

## 0.2.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/validation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@obosbbl/validation",
"version": "0.2.0",
"version": "0.3.0",
"description": "A collection of validation methods for OBOS",
"repository": {
"url": "https://github.com/code-obos/public-frontend-modules"
Expand Down