Skip to content

AmirSoleimani/IRValidator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

travis build, test N|Boom

Installation

Just use go get.

go get github.com/AmirSoleimani/IRValidator/validate

And then just import the package into your own code.

import (
	"github.com/AmirSoleimani/IRValidator/validate"
)

Usage

import (
	"fmt"

	iv "github.com/AmirSoleimani/IRValidator/validate"
)

func main() {
	// CardNumber check
	if err := iv.CardNumber("6221061049447982"); err != nil {
		fmt.Println(err)
	}

	// NationalID check
	if err := iv.NationalID("1111111111"); err != nil {
		fmt.Println(err)
	}

	// IBAN check
	if err := iv.IBAN("IR340570030280001175105001"); err != nil {
		fmt.Println(err)
	}
	
	// MobilePhone check
    	if PhoneNumber, err := validate.MobilePhone("+989121111111"); err != nil {
    		fmt.Println(err)
    	} else {
    		fmt.Println(PhoneNumber)
    	}
}

About

IBAN, National Id, Bank Card Number, Mobile Number

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published