class Amber::Validators::BaseRule

Overview

This struct holds the validation rules to be performed

Direct Known Subclasses

Defined in:

amber/validators/params.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(field : String | Symbol, msg : String | Nil, allow_blank : Bool = true) #

[View source]
def self.new(field : String | Symbol, msg : String | Nil, allow_blank : Bool = true, &block : String -> Bool) #

[View source]

Instance Method Detail

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

[View source]
def error #

[View source]
def field : String #

[View source]
def predicate : String -> Bool #

[View source]
def present : Bool #

[View source]
def value : String | Nil #

[View source]