firstError property

ValidationError get firstError

get first error in String

if there any error occured, will throw Exception

Implementation

ValidationError get firstError {
  if (!isError) {
    throw Exception('There is no error');
  }
  return errors.first;
}