fsanggang / nz_ir_validator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NzBankAccountValidator

Build Status Hex.pm

Validator for NZ bank accounts.

Examples

$ iex -S mix
> NzIrValidator.is_valid?(49091850)
{:ok, true}

iex> NzIrValidator.is_valid?(9125568)
{:error, false}

Installation

Add nz_ir_validator to your list of dependencies in mix.exs:

def deps do
  [
    {:nz_ir_validator, "~> 1.0.0"}
  ]
end

Don’t forget to update your dependencies.

$ mix deps.get

Links

Implementation is based off https://www.ird.govt.nz/resources/d/8/d8e49dce-1bda-4875-8acf-9ebf908c6e17/rwt-nrwt-spec-2014.pdf.

About

License:MIT License


Languages

Language:Elixir 100.0%