ValidationResult<T> class
Result of a validation operation.
Contains validation status, error details, and the validated value if successful.
Constructors
-
ValidationResult.error(String error, {String? suggestion, List<
String> ? examples}) -
Creates a failed validation result.
factory
- ValidationResult.success(T value)
-
Creates a successful validation result.
factory
Properties
- error → String?
-
Error message (if validation failed)
final
-
examples
→ List<
String> ? -
Example commands to resolve the issue
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isValid → bool
-
Whether the validation passed
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- suggestion → String?
-
Suggestion for fixing the error
final
- value → T?
-
The validated value (if validation passed)
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited