BlocxSingleErrorFieldValidator<T> class abstract

A base class for field validators that produce at most a single error message.

This class is intended for simple validation scenarios where each field can only produce one error. It wraps the result of validateWithSingleError into a list so it is compatible with the multi-error API of BlocxFieldValidator.

Subclasses must implement validateWithSingleError to define the actual validation logic. Subclasses should NOT override validate, as it is internally used to convert a single error into a list of errors.

Inheritance
Implementers

Constructors

BlocxSingleErrorFieldValidator({Duration? duration})
Constructs a new instance of BlocxSingleErrorFieldValidator.

Properties

duration Duration?
Optional duration associated with the error messages.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validateWithSingleError(T value) String?
Validates the given value and returns a single error message if invalid.

Operators

operator ==(Object other) bool
The equality operator.
inherited