A function that returns a custom error widget based on the error text. Called when validation fails; defaults to a Text widget if null.
final Widget Function(String error)? error;