Socket
Socket
Sign inDemoInstall

@wealthsimple/canadian-bank-account

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wealthsimple/canadian-bank-account

Validates transit and account numbers of common Canadian banks


Version published
Maintainers
1
Created
Source

canadian-bank-account Build Status

Validate transit and account numbers of common Canadian banks.

There are no dependencies.

Usage

var tdBankAccount = new CanadianBankAccount({
  institution: "004",
  transit: "12345",
  account: "1234567"
});
tdBankAccount.isTransitValid(); // Returns true
tdBankAccount.isAccountValid(); // Returns true

var invalidAccount = new CanadianBankAccount({
  institution: "001",
  transit: "123",
  account: "123456789"
});
invalidAccount.isTransitValid(); // Returns false
invalidAccount.isAccountValid(); // Returns false
invalidAccount.transitErrors(); // Returns ["Transit number must be 5 digits long."]
invalidAccount.accountErrors(); // Returns ["Bank of Montreal account number must be 7 digits long."]

Acknowledgments

Validation rules based on the following article: Square - Bank Account Troubleshooting

License

MIT

FAQs

Package last updated on 25 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc