getErrorMessage method

String? getErrorMessage(
  1. String attribute
)

Implementation

String? getErrorMessage(String attribute) {
  List<String> errors = getErrorMessages(attribute) ?? [];
  if (errors.isNotEmpty) {
    return errors[0];
  }
  return null;
}