Skip to content

Validates a Norwegian social security number. Does not support FH numbers.

Notifications You must be signed in to change notification settings

Maritims/norwegian-ssn-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

License

ISC

About

Validates a Norwegian social security number. Does not support FH numbers.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published