validate_personnummer
Validate the structure and checksum of a Swedish personnummer to ensure the digits are syntactically correct before relying on the identity number.
Instructions
USE THIS to verify a Swedish personnummer (personal identity number) before relying on it — never assume the digits are valid. Accepts the 10- or 12-digit form and checks the Luhn check digit. Validates structure only; does NOT confirm the number is registered.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| personnummer | Yes | The Swedish personnummer (10 or 12 digits; +/-/spaces ignored). |