Skip to content

feature: Add IsIBANOptions to IsIBAN decorator #2617

Open
@LiiaMenke

Description

@LiiaMenke

Description

validator.js offers options for the isIBAN validation to pass in a whitelist and blacklist of country codes. This is really helpful when validating IBANs where only specific countries should be accepted, e.g. only IBANs from the EU.

Proposed solution

Add the options as an argument to the IsIBAN decorator as well as the isIBAN function and pass it along to validator.js.

I will open a PR for this, the feature itself is trivial, the only thing I am unsure about is the following:
It seems to be standard to have any options for the validation itself be the first argument and ValidationOptions be the second argument. Keeping this up would be a breaking change though.
So if anyone has input on what would be the preferred way to handle this, I'd appreciate it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    flag: needs discussionIssues which needs discussion before implementation.type: featureIssues related to new features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions