onValidate abstract method

String? onValidate(
  1. T? value,
  2. String validationMessage
)

onValidate is used to validate the given input by the user.

Implementation

String? onValidate(
  T? value,
  String validationMessage,
);