tc

package module
v0.0.0-...-4f2f61f Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2015 License: MIT Imports: 6 Imported by: 0

README

tc - Turkish Identification Number Validator

Godoc Build Status

Check if Turkish Republic Identification Number you have is valid for first, last name and birth year.

Install

go get github.com/ferhatelmas/tc

Usage

import "github.com/ferhatelmas/tc"

tc.IsValid("17857715056")
//=> true

tc.IsValid("17857715050")
//=> false

tc.IsValidFor("17857715056", "ferhat", "elmas", 1988)
//=> true, nil

tc.IsValidFor("17857715055", "ferhat", "elmas", 1988)
//=> false, nil

IsValid checks if number is a possible correct identification number.

IsValidFor checks if number belongs to the person identified by given first name, last name and birth year.

For more information about number itself, see Turkish Identification Number on Wikipedia.

License

MIT © ferhat elmas

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValid

func IsValid(id string) bool

IsValid verifies given identification is a valid possible id.

func IsValidFor

func IsValidFor(id, firstName, lastName string, birthYear int) (bool, error)

IsValidFor checks given TC No is valid or not for given first, last name and birth year.

Types

This section is empty.

Jump to

Keyboard shortcuts

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