class
Amber::Schema::ValidationFailure
- Amber::Schema::ValidationFailure
- Reference
- Object
Overview
Base class for validation errors (contains multiple field errors)
Defined in:
amber/schema/result.crConstructors
Instance Method Summary
- #errors : Array(Error)
-
#errors_by_field : Hash(String, Array(Error))
Get errors grouped by field
-
#errors_for_field(field : String) : Array(Error)
Get errors for specific field
-
#has_error_for_field?(field : String) : Bool
Check if specific field has errors
-
#messages : Array(String)
Get all error messages as strings
- #raw_data : Hash(String, JSON::Any) | Nil
-
#to_h
Convert to hash for JSON serialization
-
#to_s(io)
Human-readable error summary
- #warnings : Array(Warning)
Constructor Detail
def self.new(errors : Array(Error), raw_data : Hash(String, JSON::Any) | Nil = nil, warnings : Array(Warning) = [] of Warning)
#