ValidationException class
A derived exception class that represents any validation errors encountered during API requests, typically related to improper data input.
- Inheritance
-
- Object
- BaseException
- ValidationException
Constructors
-
ValidationException.new({bool silent = false, List<
String> messages = const [], DioException? exception}) - Creates a new instance of ValidationException.
-
ValidationException.multipleFields({bool silent = false, Map<
String, List< ? validationMessages = const {}, required DioException exception})String> > - Constructor for creating validation messages list separated by property.
Properties
- exception ↔ DioException?
-
An optional DioException that provides details about the original error
thrown by the Dio HTTP client.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
messages
↔ List<
String> -
A list of error messages associated with the exception.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- silent ↔ bool
-
A flag indicating whether the exception should be silent or not.
getter/setter pairinherited
-
validationMessages
↔ Map<
String, List< ?String> > -
A map containing validation messages grouped by field names.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns a string representation of the ValidationException for debugging purposes.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited