firstError property

E? firstError

Gets the first error according to the composition sequence used creating of calling validation result

Implementation

E? get firstError {
  return fold((errors) => errors.isEmpty ? null : errors.first , (_) => null);
}