Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ferhatelmas/tc
Check if TC no is correct
https://github.com/ferhatelmas/tc
Last synced: 26 days ago
JSON representation
Check if TC no is correct
- Host: GitHub
- URL: https://github.com/ferhatelmas/tc
- Owner: ferhatelmas
- License: mit
- Created: 2015-08-31T14:20:17.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-16T18:44:40.000Z (almost 9 years ago)
- Last Synced: 2024-06-20T14:19:12.597Z (5 months ago)
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
## tc - Turkish Identification Number Validator
[![Godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/ferhatelmas/tc)
[![Build Status](https://travis-ci.org/ferhatelmas/tc.png?branch=master)](https://travis-ci.org/ferhatelmas/tc)> 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
```go
import "github.com/ferhatelmas/tc"tc.IsValid("17857715056")
//=> truetc.IsValid("17857715050")
//=> falsetc.IsValidFor("17857715056", "ferhat", "elmas", 1988)
//=> true, niltc.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](https://en.wikipedia.org/wiki/Turkish_Identification_Number).
### License
MIT © [ferhat elmas](http://ferhatelmas.com)