Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.03 KB

File metadata and controls

46 lines (30 loc) · 1.03 KB

Iran IDValidator

Go Report Card Go Reference codecov

Iran National Id, Bank Card Number, Mobile Number Validator for golang

Installation

go get -u github.com/mohammadv184/idvalidator

Usage

package main

import (
	"fmt"
	
	"github.com/mohammadv184/idvalidator/validate/nationalid"
	
	"github.com/mohammadv184/idvalidator/validate/card"
)

func main() {
	ok, err := card.IsValid("1234567890123456")
	if !ok {
		fmt.Println(err)
	}

	ok, err = nationalid.IsValid("1234567890123456")
	if !ok {
		fmt.Println(err)
	}

}

License

The MIT License (MIT). Please see License File for more information.