class

Schematics::CustomValidator(T)

Inherits Schematics::Validator / Reference / Object

Custom validator that wraps a user-provided proc

Constructors

new(validator_proc : T -> Bool, error_message : String = "custom validation failed")
Source

Instance methods

call(value) : T | Nil
Source
validate(value, path : String = "root") : ValidationResult
Source