ValidationContext class

Context for collecting and managing validation errors and warnings during the generation process.

Constructors

ValidationContext()

Properties

errorCount → int
Returns the total number of errors
no setter
errors → List<String>
Gets a read-only view of errors
no setter
hasErrors → bool
Returns true if there are any errors
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasWarnings → bool
Returns true if there are any warnings
no setter
isClean → bool
Returns true if the validation context is clean (no errors or warnings)
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
warningCount → int
Returns the total number of warnings
no setter
warnings → List<String>
Gets a read-only view of warnings
no setter

Methods

addError(String error) → void
Adds an error to the validation context
addErrors(Iterable<String> errors) → void
Adds multiple errors at once
addWarning(String warning) → void
Adds a warning to the validation context
addWarnings(Iterable<String> warnings) → void
Adds multiple warnings at once
clear() → void
Clears all errors and warnings
clearErrors() → void
Clears only errors
clearWarnings() → void
Clears only warnings
getSummary() → String
Creates a summary string of all errors and warnings
merge(ValidationContext other) → void
Merges another validation context into this one
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
throwIfErrors() → void
Throws an exception if there are any errors
toString() → String
A string representation of this object.
inherited

Operators

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