Validator

iban

IBAN structure + ISO 13616 mod-97 checksum. Country-length table NOT enforced — pair with a length check if you need it. Empty values pass.

Live demo

Try GB82 WEST 1234 5698 7654 32 (a textbook valid IBAN).

errors: null

Usage

import { FormControl } from '@angular/forms';
import { WrValidators } from 'ngwr/validators';

const iban = new FormControl('', [WrValidators.iban]);

iban.setValue('GB82 WEST 1234 5698 7654 32'); // → valid (passes mod-97)

Why ngwr provides this

A real ISO 13616 mod-97 checksum, not a length check — and implemented without BigInt, so it runs everywhere Angular does.

API

NameDescriptionTypeDefault
signatureStatic — drop into a validators array.ValidatorFn
checksStructure (2 letters + 2 digits + alphanumerics) and ISO 13616 mod-97. Per-country length tables are not enforced.
error keyOn failure: { iban: true }. Empty value passes.{ iban: true }

See also