equals<T> static method

FormeValidator<T> equals<T>(
  1. T value, {
  2. String errorText = '',
})

when valid:

  1. value is null
  2. value == given value

Implementation

static FormeValidator<T> equals<T>(T value, {String errorText = ''}) {
  return (f, T v) => value == null || v == value ? null : errorText;
}