Uk_modulus - UK bank account validation (sort code & account number)

Hi all!

I’d like to share uk_modulus, a small open-source Elixir library for validating UK bank details.

Overview

uk_modulus implements the official UK modulus checking algorithm to validate:

  • Sort codes

  • Account numbers

It supports the standard MOD10, MOD11, and DBLAL rules, including documented exceptions.

Features

  • Validates UK bank account numbers against sort codes
  • Ships with official Vocalink data (1,151 weight rules)
  • Supports MOD10, MOD11, and DBLAL algorithms
  • Handles all Vocalink exceptions (1-14)
  • Fast concurrent access via ETS
  • Optional auto-update from Vocalink’s website

Motivation

I needed a lightweight, dependency-free way to validate UK bank account details in an Elixir project, so I extracted this logic into a focused library.

Links

GitHub repository (with usage examples and details):

7 Likes