class Amber::Schema::Validator::Context

Overview

Validation context passed to validators

Defined in:

amber/schema/validator.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(data : Hash(String, JSON::Any), result : LegacyResult, schema : Definition) #

[View source]

Instance Method Detail

def add_error(error : Error) #

[View source]
def add_warning(warning : Warning) #

[View source]
def data : Hash(String, JSON::Any) #

[View source]
def field_exists?(name : String) : Bool #

Helper methods for validators


[View source]
def field_value(name : String) : JSON::Any | Nil #

[View source]
def result : LegacyResult #

[View source]
def schema : Definition #

[View source]