PredicateValidator<T extends Object> constructor

const PredicateValidator<T extends Object>(
  1. bool predicate(
    1. T value
    ), {
  2. required String error,
  3. bool ignoreEmptyValues = true,
})

Constructs a validator that reports error when predicate returns false.

Implementation

const PredicateValidator(
  this.predicate, {
  required super.error,
  super.ignoreEmptyValues,
});