Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ UK modulo - Scala
=================

This is an implementation of the [VocaLink UK Bank account number
modulus checking][VocaLink link] version 6.90 (and previous versions), written in Scala.
modulus checking][VocaLink link] version 7.30 (and previous versions), written in Scala.

[VocaLink link]: https://www.vocalink.com/tools/modulus-checking/

Expand All @@ -32,14 +32,14 @@ Getting started

Sbt:

libraryDependencies += "com.github.mpetruska" %% "uk-modulo-scala" % "6.80.0"
libraryDependencies += "com.github.mpetruska" %% "uk-modulo-scala" % "7.30.0"

pom.xml:

<dependency>
<groupId>com.github.mpetruska</groupId>
<artifactId>uk-modulo-scala_2.13</artifactId>
<version>6.80.0</version>
<version>7.30.0</version>
</dependency>

Usage
Expand Down Expand Up @@ -88,6 +88,8 @@ Please report issues and feature requests [here](https://github.com/mpetruska/uk
Version history
---------------

* 7.30.0 - updates implementation according to [version 7.30 of the spec](https://www.vocalink.com/media/5gbdhdhe/validating-account-numbers-uk-modulus-checkingv7-3.pdf)
(valid from 2022-07-22)
* 6.90.0 - updates implementation according to [version 6.90 of the spec](https://www.vocalink.com/media/000dcpzj/vocalink-validating-account-numbers-v6-90.pdf)
(valid from 2022-02-14)
* 6.80.0 - updates implementation according to [version 6.80 of the spec](https://www.vocalink.com/media/3allk2nz/vocalink-validating-account-numbers-v6-80.pdf)
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ lazy val publishSettings = Seq(
organization := "com.github.mpetruska",
name := "uk-modulo-scala",
homepage := Some(url("https://github.com/mpetruska/uk-modulo-scala")),
version := "6.90.0",
version := "7.30.0",
licenses := Seq("MIT" -> url("http://www.opensource.org/licenses/mit-license.php")),
crossScalaVersions := Seq("2.12.13", "2.13.5"),
publishMavenStyle := true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
010004 016715 MOD11 0 0 0 0 0 0 8 7 6 5 4 3 2 1
040003 040003 DBLAL 2 1 2 1 2 1 8 7 6 5 4 3 2 1
040004 040004 DBLAL 0 0 0 0 0 0 8 7 6 5 4 3 2 1
040005 040006 DBLAL 2 1 2 1 2 1 8 7 6 5 4 3 2 1
040005 040005 DBLAL 2 1 2 1 2 1 8 7 6 5 4 3 2 1
040006 040006 DBLAL 0 3 0 0 0 3 8 7 6 5 4 3 2 1
040008 040008 DBLAL 0 3 0 0 0 4 8 7 6 5 4 3 2 1
040010 040014 MOD11 0 0 0 0 0 0 0 7 6 5 4 3 2 1
040010 040014 DBLAL 2 1 2 1 2 1 2 1 2 1 2 1 2 1
040015 040015 MOD11 0 0 0 0 0 0 0 7 6 5 4 3 2 1
Expand Down Expand Up @@ -33,7 +35,8 @@
042927 042956 MOD10 0 0 1 8 2 6 3 7 9 5 8 4 2 1
044001 044001 MOD10 0 2 1 2 0 7 1 1 0 3 8 1 9 1
050000 050020 MOD11 0 0 0 0 0 0 2 1 7 5 8 2 4 1
050022 058999 MOD11 0 0 0 0 0 0 2 1 7 5 8 2 4 1
050022 050094 MOD11 0 0 0 0 0 0 2 1 7 5 8 2 4 1
050096 058999 MOD11 0 0 0 0 0 0 2 1 7 5 8 2 4 1
070030 070030 MOD11 0 0 7 6 5 8 9 4 5 6 7 8 9 -1
070040 070040 MOD11 0 0 7 6 5 8 9 4 5 6 7 8 9 -1
070055 070055 MOD11 0 0 7 6 5 8 9 4 5 6 7 8 9 -1
Expand Down Expand Up @@ -976,7 +979,7 @@
404385 404799 DBLAL 2 1 2 1 2 1 2 1 2 1 2 1 2 1
406420 406420 MOD10 0 0 0 0 0 0 8 7 6 5 4 3 2 1
406453 406453 DBLAL 2 1 2 1 2 1 2 1 2 1 2 1 2 1
406460 406460 DBLAL 2 1 2 1 2 1 2 1 2 1 2 1 2 1
406466 406466 DBLAL 2 1 2 1 2 1 2 1 2 1 2 1 2 1
500000 501029 MOD11 0 0 0 0 0 0 8 7 6 5 4 3 2 1
502101 560070 MOD11 0 0 0 0 0 0 8 7 6 5 4 3 2 1
600000 600108 MOD11 0 0 0 0 0 0 8 7 6 5 4 3 2 1
Expand Down Expand Up @@ -1031,8 +1034,10 @@
802156 802179 MOD11 0 0 1 8 2 6 3 7 9 5 8 4 2 1
802181 803599 MOD11 0 0 1 8 2 6 3 7 9 5 8 4 2 1
803609 819999 MOD11 0 0 1 8 2 6 3 7 9 5 8 4 2 1
820000 826917 MOD11 0 0 0 0 0 0 0 0 7 3 4 9 2 1
820000 826917 DBLAL 2 1 2 1 2 1 2 1 2 1 2 1 2 1 3
820000 826097 MOD11 0 0 0 0 0 0 0 0 7 3 4 9 2 1
820000 826097 DBLAL 2 1 2 1 2 1 2 1 2 1 2 1 2 1 3
826099 826917 MOD11 0 0 0 0 0 0 0 0 7 3 4 9 2 1
826099 826917 DBLAL 2 1 2 1 2 1 2 1 2 1 2 1 2 1 3
826919 827999 MOD11 0 0 0 0 0 0 0 0 7 3 4 9 2 1
826919 827999 DBLAL 2 1 2 1 2 1 2 1 2 1 2 1 2 1 3
829000 829999 MOD11 0 0 0 0 0 0 0 0 7 3 4 9 2 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ object ModulusWeightTable extends ResourceTable {

type Row = ModulusWeightRow

val resourcePath = "/valacdos-v690.txt"
val resourcePath = "/valacdos-v730.txt"

def parseAllRows(in: Reader): Either[Error, List[Row]] = {
ModulusWeightRowParser.parseAllRows(in) match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ModulusCheckSpec extends AnyWordSpec with TableDrivenPropertyChecks with M
("040340", "00000001", false),
("040390", "00000001", false),
("042900", "00000001", false),
("406460", "00000001", false),
("406460", "00000001", true),
("236802", "00000001", false),
("608410", "00000001", false)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ModulusWeightRowParserSpec extends AnyWordSpec with Matchers {
import ModulusWeightRowParser._

"be able to parse the weights table" in {
val parseResult = parseAllRows(new InputStreamReader(ModulusWeightRowParser.getClass.getResourceAsStream("/valacdos-v690.txt")))
val parseResult = parseAllRows(new InputStreamReader(ModulusWeightRowParser.getClass.getResourceAsStream("/valacdos-v730.txt")))
parseResult.successful shouldBe true

val rows = parseResult.get
Expand Down