canadian-bank-account
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();
tdBankAccount.isAccountValid();
var invalidAccount = new CanadianBankAccount({
institution: "001",
transit: "123",
account: "123456789"
});
invalidAccount.isTransitValid();
invalidAccount.isAccountValid();
invalidAccount.transitErrors();
invalidAccount.accountErrors();
Acknowledgments
Validation rules based on the following article: Square - Bank Account Troubleshooting
License
MIT