Skip to content

electronicFormatIBAN allows leading and trailing dashes #652

@junkkerrigan

Description

@junkkerrigan

Describe the bug

electronicFormatIBAN allows leading and trailing dashes, thus letting invalid strings pass the validation.

To Reproduce

const formatted = ibantools.electronicFormatIBAN('-- DE02 1203 0000 0000 2020 51 --')

// expected: null
// actual: DE02120300000000202051

Environment:

ibantools: 4.5.1
node: 22.21.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions