Skip to content

API reference / Quittio \ Core \ Validation \ Plausibility

Iban

final class in quittio/core

Quittio\Core\Validation\Plausibility\Iban · Source

IBAN check digit validation (ISO 13616, mod 97-10) without extensions.

Methods#

MethodDescription
::isValid()Whether the IBAN, after normalize(), has the IBAN structure (country code, two check digits, 11 to 30 alphanumeric characters) and correct check digits (mod 97 = 1). The country specific length is not checked.
::mod97()Remainder of a number given as alphanumeric string (A = 10 … Z = 35) divided by 97.
::normalize()Removes all whitespace and upper-cases the IBAN, e.g. "de02 1203 0000" becomes "DE021203000".

isValid()#

public static function isValid(string $iban): bool

static

Whether the IBAN, after normalize(), has the IBAN structure (country code, two check digits, 11 to 30 alphanumeric characters) and correct check digits (mod 97 = 1). The country specific length is not checked.

ParameterTypeDescription
$ibanstring
Returns
bool

mod97()#

public static function mod97(string $value): int

static

Remainder of a number given as alphanumeric string (A = 10 … Z = 35) divided by 97.

ParameterTypeDescription
$valuestring
Returns
int

normalize()#

public static function normalize(string $iban): string

static

Removes all whitespace and upper-cases the IBAN, e.g. "de02 1203 0000" becomes "DE021203000".

ParameterTypeDescription
$ibanstring
Returns
string

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.