Validate a UK bank account number against a sort code using the VocaLink modulus check
npm install @usecomma/modulus-checkyarn:``sh`
yarn add modulus-checknpm
or :`sh`
npm install modulus-check
This method validates if the given accountNumber and sortCode represent a valid Faster Payment Account.
#### Arguments
1. accountNumber (string): The account number to validate.sortCode
2. (string): The sort code to validate.
#### Returns
(boolean): Returns true if the account is valid.
#### Example
`js
new ModulusCheck({ accountNumber: '15764273', sortCode: '938063' }).isValid();
// => false
new ModulusCheck({ accountNumber: '66374958', sortCode: '089999' }).isValid();
// => true
new ModulusCheck({ accountNumber: '66374958', sortCode: '08-99-99' }).isValid();
// => true
new ModulusCheck({ accountNumber: '66374958', sortCode: '08-9999' }).isValid();
// => true
`
`sh`
npm test
branch
`sh
npm version [ | major | minor | patch] -m "Release %s"
`
Head to circelci and trigger a new pipeline with parameter release: true`[npm-image]: https://img.shields.io/npm/v/modulus-check.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@usecomma/modulus-check