Top Level Namespace

Defined in:

Macro Summary

Macro Detail

macro is(name, *args) #

An (optional) expressive flavor of Validator (or Valid alias). Not exposed by default, must be imported:

require "validator/is"

is :email?, "[email protected]"                        # => true
is "email?", "[email protected]"                       # => true
is :url?, "https://github.com/Nicolab/crystal-validator" # => true

[View source]
macro is!(name, *args) #

Same as is but raise a Validator::Error displaying an inspection if the validation is false. Useful for the unit tests :)


[View source]