class

JoobQ::APIValidation::ValidationResult

Inherits JSON::Serializable / Reference / Object

Validation result container

Constructors

new(pull : JSON::PullParser)
Source
new(valid : Bool, errors : Array(ValidationError) = [] of ValidationError, data : JSON::Any | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

add_error(field : String, message : String, value : JSON::Any | Nil = nil, code : String = "validation_error")
Source
data
Source
data=(value : JSON::Any | Nil)
Source
error_response
Source
errors
Source
success?
Source
valid
Source