NRB (Numer Rachunku Bankowego) is Poland’s 26-digit domestic bank account number, verified using the MOD-97 checksum from the IBAN standard. An NRB is structurally the numeric portion of a Polish IBAN (i.e. the IBAN without the PL prefix).
Uses the MOD-97 algorithm from ISO 13616 (IBAN standard):
Reject inputs longer than 40 characters. Strip spaces and hyphens, and an optional PL prefix.
Assert exactly 26 digits remain.
Rearrange: move the first 2 digits (the check digits) to the end and insert the numeric country code for Poland (2521) between the remaining 24 digits and them, giving a 30-digit string.
Compute the 30-digit string modulo 97. The result must equal 1.