tc - Turkish Identification Number Validator
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