SchemaValidator class
Validates data against a DataValidationSchema.
The validator checks each field in the data against the rules defined in the schema and collects all validation errors.
Constructors
- SchemaValidator(DataValidationSchema schema)
-
Creates a SchemaValidator with the given
schema.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- schema → DataValidationSchema
-
The schema to validate against.
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
-
validate(
Map< String, dynamic> data) → ValidationResult -
Validates
dataagainst the schema. -
validateOrThrow(
Map< String, dynamic> data) → Map<String, dynamic> - Validates and returns the data if valid, or throws with errors.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited