validator abstract method

E? validator(
  1. T value
)

A function that must return a validation error if the provided value is invalid and null otherwise.

Implementation

E? validator(T value);