class

Schematics::Schema(T)

Inherits Reference / Object

Modern Schema implementation using compile-time type checking

Constructors

Class methods

with_validator(validator : Validator(T))

Convenience method to create a schema with custom validator

Source

Instance methods

parse(data) : T

Validate and parse data, raising on error

Source
valid?(data) : Bool

Validate and return boolean (backward compatible)

Source
validate(data) : ValidationResult

Validate data and return detailed result

Source