validate method

  1. @override
bool validate(
  1. dynamic cached,
  2. dynamic value,
  3. DogEngine engine
)
override

Implementation

@override
bool validate(cached, value, DogEngine engine) {
  if (value == null) return true;
  var it = value as Iterable;

  if (min != null) {
    if (it.length < min!) return false;
  }

  if (max != null) {
    if (it.length > max!) return false;
  }

  return true;
}