From 0ee02c3ed0fe162b3eac49c6574f6eb90a6f4b18 Mon Sep 17 00:00:00 2001 From: Francisco Cardoso Date: Fri, 29 Apr 2016 17:34:40 +0100 Subject: [PATCH] Release 0.0.3 --- CHANGELOG.md | 9 ++++++++- dist/index.js | 4 ++++ package.json | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae788c5..e5ee3aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,14 @@ # Changelog -## [0.0.2](https://github.com/uphold/uk-modulus-checking/tree/0.0.2) +## [0.0.3](https://github.com/uphold/uk-modulus-checking/tree/HEAD) +[Full Changelog](https://github.com/uphold/uk-modulus-checking/compare/0.0.2...HEAD) + +**Merged pull requests:** + +- Add accountNumber and sortCode length validation [\#7](https://github.com/uphold/uk-modulus-checking/pull/7) ([promag](https://github.com/promag)) + +## [0.0.2](https://github.com/uphold/uk-modulus-checking/tree/0.0.2) (2016-03-09) [Full Changelog](https://github.com/uphold/uk-modulus-checking/compare/0.0.1...0.0.2) **Merged pull requests:** diff --git a/dist/index.js b/dist/index.js index 7a7d6ae..eee141f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -277,6 +277,10 @@ var UkModulusChecking = function () { }, { key: 'isValid', value: function isValid() { + if (this.accountNumber.length < 6 || this.accountNumber.length > 10 || this.sortCode.length !== 6) { + return false; + } + var checks = this.getSortCodeChecks(); // If no range is found that contains the sorting code, there is no modulus check that can be performed. diff --git a/package.json b/package.json index 35c300f..392589c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uk-modulus-checking", - "version": "0.0.2", + "version": "0.0.3", "description": "Validate a UK bank account number against a sort code using the VocaLink modulus check", "author": "Uphold", "license": "MIT",