personnummer

package module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2018 License: MIT Imports: 1 Imported by: 1

README

personnummer Build Status GoDoc Go Report Card

Validate Swedish social security numbers.

Installation

go get -u github.com/personnummer/go

Example

package main

import (
	personnummer "github.com/personnummer/go"
)

func main() {
	personnummer.Valid(6403273813)
	//=> true
	
	personnummer.Valid("19900101-0017")
	//=> true
	
	// works with co-ordination numbers
	personnummer.Valid("701063-2391")
	//=> true

	personnummer.Valid("510818-916")
	//=> false
}

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Valid

func Valid(i interface{}) bool

Valid will validate Swedish social security numbers.

func ValidString

func ValidString(in string) bool

ValidateStrings validate Swedish social security numbers.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL