class Launch::Validators::OptionalRule
Overview
OptionalRule only validates (evaluates block) if the key is present and the value is not blank (see call_predicate).
Defined in:
launch/validators/params.crInstance Method Summary
Instance methods inherited from class Launch::Validators::BaseRule
apply(params : Launch::Router::Params)
apply,
error
error,
field : String
field,
predicate : String -> Bool
predicate,
present : Bool
present,
value : String | Nil
value
Constructor methods inherited from class Launch::Validators::BaseRule
new(field : String | Symbol, msg : String | Nil, allow_blank : Bool = true)new(field : String | Symbol, msg : String | Nil, allow_blank : Bool = true, &block : String -> Bool) new