contains static method
FormFieldValidator that requires the field's value to contain a specific value.
Parameters:
substring
The value that the field's value should contain.caseSensitive
Whether the search is case-sensitive (default: true).errorText
The error message when the value does not contain the substring.checkNullOrEmpty
Whether to check for null or empty values.
Implementation
static FormFieldValidator<String> contains(
String substring, {
bool caseSensitive = true,
String? errorText,
bool checkNullOrEmpty = true,
}) => ContainsValidator(
substring,
caseSensitive: caseSensitive,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;