getFirstErrorMessage method

String? getFirstErrorMessage()

Get the error message for the validation failure.

Implementation

String? getFirstErrorMessage() {
  if (errorResponses.isEmpty) {
    return null;
  }

  return _formatMessage(errorResponses.first.rule);
}