Skip to content

Account number wrong on German IBAN (only 9 digits) #550

@magnattic

Description

@magnattic

Describe the bug
When running extractIBAN, the extracted account number for German IBANs is only 9 digits when it should be 10.

Example IBANs:

  • DE22 1001 0050 0123 4567 89 -> produces '123456789'
  • DE40 9263 7373 1623 4311 42 -> produces '623431142'

Official docs from the Deutsche Bundesbank:
image

To Reproduce
Run this test:

import { extractIBAN } from 'ibantools';

describe('ibantools', () => {
  it('just works, () => {
    expect(extractIBAN('DE22 1001 0050 0123 4567 89').accountNumber).toBe(
      '0123456789'
    );
  });
});

Expected behavior
The test should pass.

Environment:
ibantools v4.5.1

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions