equals<T> static method

Validator<T> equals<T>(
  1. T other, {
  2. required ValidatorResult onNotEqual,
})

Implementation

static Validator<T> equals<T>(T other, {required ValidatorResult onNotEqual}) {
  return (value) {
    if (value != other) return onNotEqual;
    return null;
  };
}