Skip to content

ahstro/elm-ssn-validation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elm-ssn-validation

Validate social security numbers. If the type of SSN you'd like to validate isn't available, submit an issue or, even better, a pull request.

Available SSNs

Language Validation Normalization
🇸🇪 Swedish (personnummer)

Installation

elm-package install ahstro/elm-ssn-validation

Usage

import Validation.SSN.Swedish as SSN


case SSN.validate "811218-9876" of
    Ok ssn ->
        ssn ++ " is valid" -- "811218-9876 is valid"
    Err error ->
        error


if SSN.isValid "811218-9876" then
  "Yay"
else
  "Nay"

More examples are available in the /tests folder.

About

Validate social security numbers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages