validateWithSingleError method
Validates the given value and returns a single error message if invalid.
Returns null if the value is valid.
This method must be implemented by subclasses to define custom validation logic.
Implementation
@override
String? validateWithSingleError(num value) {
if (value < minValue || value > maxValue) {
return loc.numberRangeError(minValue, maxValue);
}
return null;
}