norwegian-ssn-validator
v1.2.0
Published
Validates a Norwegian social security number. Does not support H-numbers, D-numbers or FH-numbers.
Downloads
21
Readme
norwegian-ssn-validator
Component for validating Norwegian social security numbers.
Getting started
Installation
yarn add norwegian-ssn-validator
Usage
import { validateSsn } from 'norwegian-ssn-validator'
const ssn = '01015111111'
const validationResult = validateSsn(ssn)
if(validationResult.isSuccess()) {
console.log('SSN is valid')
} else {
console.log(`SSN is invalid: ${validationResult.errorCode}`)
}
Versioning
Maintained under the Semantic Verisoning Guidelines.