SchemaViolation class final

A single JSON Schema validation failure.

path is the dot-notation path to the field that failed (e.g. 'address.city', 'tags[0]'). An empty string means the violation is at the root document level (e.g. a required field is missing from the top-level map).

message is a human-readable description of the constraint that was violated, suitable for display in error messages and logs.

Constructors

SchemaViolation({required String path, required String message})
Creates a SchemaViolation at path with message.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
message String
Human-readable description of the violated constraint.
final
path String
Dot-notation path to the offending field, or '' for root-level violations.
final
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.
override

Operators

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