package
module
Version:
v0.0.0-...-61ddfc2
Opens a new window with list of versions in this module.
Published: May 14, 2020
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Turkish Identification Number Validator
A library to validate Turkish identification number. It provides 2 functions.
Example
id := "43848743180"
if !trid.Valid() {
log.Printf("id is not valid")
}
If you want more details about the error use Validate function instead:
id := "43848743180"
if err := trid.Validate(); err!=nil {
log.Printf("id is not valid: %s", err.Error())
}
References
Documentation
¶
Valid returns if the id is valid. It is a convenience function to easily get the bool result of
the validation.
Validate validates the id and returns an error if it is not valid.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.