Skip to content

ferhatelmas/tc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Related

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

License

MIT © ferhat elmas

About

Check if TC no is correct

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages