Skip to content

Commit 0ee02c3

Browse files
author
Francisco Cardoso
committed
Release 0.0.3
1 parent 3ab5c1f commit 0ee02c3

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# Changelog
22

3-
## [0.0.2](https://github.com/uphold/uk-modulus-checking/tree/0.0.2)
3+
## [0.0.3](https://github.com/uphold/uk-modulus-checking/tree/HEAD)
44

5+
[Full Changelog](https://github.com/uphold/uk-modulus-checking/compare/0.0.2...HEAD)
6+
7+
**Merged pull requests:**
8+
9+
- Add accountNumber and sortCode length validation [\#7](https://github.com/uphold/uk-modulus-checking/pull/7) ([promag](https://github.com/promag))
10+
11+
## [0.0.2](https://github.com/uphold/uk-modulus-checking/tree/0.0.2) (2016-03-09)
512
[Full Changelog](https://github.com/uphold/uk-modulus-checking/compare/0.0.1...0.0.2)
613

714
**Merged pull requests:**

dist/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,10 @@ var UkModulusChecking = function () {
277277
}, {
278278
key: 'isValid',
279279
value: function isValid() {
280+
if (this.accountNumber.length < 6 || this.accountNumber.length > 10 || this.sortCode.length !== 6) {
281+
return false;
282+
}
283+
280284
var checks = this.getSortCodeChecks();
281285

282286
// If no range is found that contains the sorting code, there is no modulus check that can be performed.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uk-modulus-checking",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "Validate a UK bank account number against a sort code using the VocaLink modulus check",
55
"author": "Uphold",
66
"license": "MIT",

0 commit comments

Comments
 (0)