validate function

bool validate(
  1. String? input,
  2. BoolFn predicate
)

Method to decide whether a String input returns true or false through the predicate function or not.

Implementation

bool validate(String? input, BoolFn predicate) {
  return predicate(input);
}