File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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:**
Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments