class Schematics::Schema(T)

Overview

Modern Schema implementation using compile-time type checking

Defined in:

schema.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.with_validator(validator : Validator(T)) #

Convenience method to create a schema with custom validator


[View source]

Instance Method Detail

def parse(data) : T #

Validate and parse data, raising on error


[View source]
def valid?(data) : Bool #

Validate and return boolean (backward compatible)


[View source]
def validate(data) : ValidationResult #

Validate data and return detailed result


[View source]