This package provides a simple NIK (Nomor Induk Kependudukan) validator for validating Indonesian national identification numbers.
package main
import (
"fmt"
"github.com/klepon46/nik-validator/pkg"
)
func main() {
validator := pkg.NewValidator()
nik := "your_nik_here"
err := validator.Validate(nik)
if err != nil {
fmt.Println("NIK validation failed:", err)
return
}
fmt.Println("NIK is valid")
}
go get github.com/klepon46/nik-validator
This package is licensed under the MIT license. See the LICENSE file for more information.
Contributions are welcome! Please feel free to submit a pull request.