validate method

  1. @override
String? validate(
  1. String input
)
override

Validates the given input and returns an error message if validation fails. Returns null if the input is valid.

Implementation

@override
String? validate(String input) {
  return input.isEmpty ? message : null;
}