Skip to content

Package iso7064 is a GO implementation of ISO 7064 used in validation of format like IBAN, ISTC, ISNI, LEI, etc.

License

Notifications You must be signed in to change notification settings

digitorus/iso7064

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang ISO 7064 validator

Build & Test golangci-lint CodeQL Go Report Card Coverage Status Go Reference

This package providers a validtor for the ISO 7064 format like IBAN, ISTC, ISNI, LEI, etc. Currently this package is hardcoded to validate against MOD 97-10 using numeric strings with two check digits. Please feel free to contribute other ISO 7064 algorithms such as MOD 11-2, 37-2, 661-26 etc.

The initial version of this package is based the IBAN validator from https://github.com/almerlucke/go-iban

Contributions

We are looking for contribution to add the following functionality:

  • Calculate a new checksum value
  • Exctract the checksum value of a given value
  • Support other modes ISO 7064 algorithms such as MOD 11-2, 37-2, 661-26 etc.
  • Provider helpers (rearrangers) for specific implementations like IBAN
  • Add more implementation tests

Example

package main

import (
	"fmt"
	"github.com/digitorus/iso7064"
)

func main() {
	if !iso7064.IsValid("9845000Q555DEB9E2A69") {
		fmt.Printf("%v\n", err)
		return
	}

    	fmt.Println("Valid ISO 7064 value")
}

About

Package iso7064 is a GO implementation of ISO 7064 used in validation of format like IBAN, ISTC, ISNI, LEI, etc.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages