class Schematics::Field(T)

Defined in:

field.cr

Constructors

Instance Method Summary

Instance methods inherited from class Schematics::BaseField

get_default get_default, has_default? : Bool has_default?, name : String name, required : Bool required, validate(value, path : String) : ValidationResult validate

Constructor methods inherited from class Schematics::BaseField

new(name : String, required : Bool = true) new

Constructor Detail

def self.new(name : String, validator : Validator(T), required : Bool = true, default : T | Nil = nil, has_default_value : Bool = false) #

[View source]

Instance Method Detail

def call(value) : T | Nil #

[View source]
def default : T | Nil #

[View source]
def get_default #

[View source]
def has_default? : Bool #

[View source]
def has_default_value : Bool #

[View source]
def validate(value, path : String) : ValidationResult #

[View source]
def validator : Validator(T) #

[View source]