validate method

  1. @override
String? validate(
  1. F form,
  2. E key,
  3. int value
)
override

Implementation

@override
String? validate(F form, E key, int value) {
  final otherValue = form.getValueByKey(otherKey);

  if (otherValue is! int) return null;

  if (value >= otherValue) {
    return loc.lessThanFieldError(otherValue);
  }

  return null;
}