class Alfodr::Validators::OptionalRule

Overview

OptionalRule only validates if the key is present.

Defined in:

alfodr/validators/params.cr

Instance Method Summary

Instance methods inherited from class Alfodr::Validators::BaseRule

apply(params : Alfodr::Router::Params) apply, error error, field : String field, predicate : String -> Bool predicate, value : String | Nil value

Constructor methods inherited from class Alfodr::Validators::BaseRule

new(field : String | Symbol, msg : String | Nil, &block : String -> Bool) new

Instance Method Detail

def apply(params : Alfodr::Router::Params) #

[View source]