vin static method
FormFieldValidator that requires the field's value to be a valid VIN.
Parameters:
-
regex
The regex pattern to match. -
vinWhitelist
The list of allowed VINs. -
vinBlacklist
The list of disallowed VINs. -
errorText
The error message when the VIN is invalid. -
checkNullOrEmpty
Whether to check for null or empty values. This regex matches a valid Vehicle Identification Number (VIN) format. -
A VIN is exactly 17 characters long.
-
It allows alphanumeric characters, but excludes the letters I, O, and Q.
Examples: 1HGCM82633A123456, JH4KA8260MC000000
Implementation
static FormFieldValidator<String> vin({
RegExp? regex,
List<String> vinWhitelist = const <String>[],
List<String> vinBlacklist = const <String>[],
String? errorText,
bool checkNullOrEmpty = true,
}) => VinValidator(
regex: regex,
vinWhitelist: vinWhitelist,
vinBlacklist: vinBlacklist,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;