il-bank-account-validator

2.0.0 • Public • Published

Israeli Bank Account Validator

Israeli Bank Account Validator provides validation utilities for Israeli bank account numbers. You can use it to present appropriate UI to your user as they type. This is a JavaScript module.

It can be used both on the front end (if browserified or imported as JS Module), and on the back end as a NodeJS module.

Installation

You can install il-bank-account-validator through npm.

npm install il-bank-account-validator

Example

In Node:

var validator = require('il-bank-account-validator');

// TODO: Set to your real info
var bank = 0;
var branch = 0;
var account = 0;

console.log("My details are:", bank, branch, account);
console.log("Am I valid?");
if(validator(bank, branch, account)) {
    console.log("Yes!");
} else {
    console.log("No!");
}

In the browser JS-Modules and <script> tags:

<script type="module">
  import bankAccountValidation from 'il-bank-account-validator';

  if (bankAccountValidation(bankNumber, branchNumber, accountNumber)) {
    renderFullyValidAccountNumber();
  } else if (!accountValidation.isPotentiallyValid) {
    renderInvalidAccountNumber();
  }
</script>

If you need to support browsers that don't support JS-Modules (like Internet Explorer, Safari iOS <10.3), you can instead use a bundler like Webpack.

Package Sidebar

Install

npm i il-bank-account-validator

Weekly Downloads

12

Version

2.0.0

License

MIT

Unpacked Size

11.5 kB

Total Files

4

Last publish

Collaborators

  • climax708