endsWith static method

FormFieldValidator<String> endsWith(
  1. String suffix, {
  2. String? errorText,
  3. bool checkNullOrEmpty = true,
})

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;