bic static method
FormFieldValidator that requires the field's value to be a valid BIC.
Parameters:
regex
The regex pattern to match.errorText
The error message when the BIC is invalid.checkNullOrEmpty
Whether to check for null or empty values.
This regex matches BIC (Bank Identifier Code).
- It consists of 8 or 11 characters.
- It starts with four letters (bank code), followed by two letters (country code), two characters (location code), and optionally three characters (branch code).
Examples: DEUTDEFF, NEDSZAJJXXX
Implementation
static FormFieldValidator<String> bic({
RegExp? regex,
String? errorText,
bool checkNullOrEmpty = true,
}) => BicValidator(
regex: regex,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;