endsWith static method
FormFieldValidator that requires the field's value to end with a specific value.
Parameters:
suffix
The value that the field's value should end with.errorText
The error message when the value does not end with the suffix.checkNullOrEmpty
Whether to check for null or empty values.
Implementation
static FormFieldValidator<String> endsWith(
String suffix, {
String? errorText,
bool checkNullOrEmpty = true,
}) => EndsWithValidator(
suffix,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;