validator method
A function that must return a validation error if the provided
value is invalid and null otherwise.
Implementation
@override
OrderIDValidationError? validator(String value) {
if (value.isEmpty) {
return null;
}
return _orderIDRegExp.hasMatch(value) && value.length < 30 ? null : OrderIDValidationError.invalid;
}