startsWith static method
FormFieldValidator that requires the field's value to start with a specific value.
Parameters:
prefixThe value that the field's value should start with.errorTextThe error message when the value does not start with the prefix.checkNullOrEmptyWhether to check for null or empty values.
Implementation
static FormFieldValidator<String> startsWith(
String prefix, {
String? errorText,
bool checkNullOrEmpty = true,
}) => StartsWithValidator(
prefix,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;