isBIC method
Check if the string is a valid BIC string.
Parameters:
value
The string to be evaluated.
Returns:
A boolean indicating whether the value is a valid BIC.
Implementation
bool isBIC(String value) {
final String bic = value.replaceAll(' ', '').toUpperCase();
if (bic.length != 8 && bic.length != 11) {
return false;
}
return regex.hasMatch(bic);
}