isIBAN static method

bool isIBAN(
  1. String value
)

Returns true for an IBAN-format string (2 letters + digits).

Implementation

static bool isIBAN(String value) {
  final RegExp regex = RegExp(r'^[A-Za-z]{2}[0-9]{2}[A-Za-z0-9]{11,30}$');
  return regex.hasMatch(value.trim());
}