duns static method
FormFieldValidator that requires the field's value to be a valid DUNS number.
Parameters:
-
regex
The regex pattern to match. -
errorText
The error message when the DUNS number is invalid. -
checkNullOrEmpty
Whether to check for null or empty values. This regex matches a valid DUNS number format. -
It requires exactly 9 digits.
Examples: 123456789, 987654321
Implementation
static FormFieldValidator<String> duns({
RegExp? regex,
String? errorText,
bool checkNullOrEmpty = true,
}) => DunsValidator(
regex: regex,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;