class Flow::Prop::Validator(U)

Defined in:

flow/property/validator.cr

Constant Summary

DEFAULT_PARAMS = {required: false, max_length: 0, min_length: 0, size: 0, max_value: 0, min_value: 0, inclusion: [] of Hash(String, String), exclusion: [] of Hash(String, String)}

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, value : U, options = DEFAULT_PARAMS) #

[View source]

Instance Method Detail

def errors #

[View source]
def exclusion : Array(Hash(String, String)) | Array(String) #

[View source]
def exclusion=(exclusion : Array(Hash(String, String)) | Array(String)) #

[View source]
def inclusion : Array(Hash(String, String)) | Array(String) #

[View source]
def inclusion=(inclusion : Array(Hash(String, String)) | Array(String)) #

[View source]
def max_length : Int32 #

[View source]
def max_length=(max_length : Int32) #

[View source]
def max_value : Int32 | Float64 #

[View source]
def max_value=(max_value : Int32 | Float64) #

[View source]
def min_length : Int32 #

[View source]
def min_length=(min_length : Int32) #

[View source]
def min_value : Int32 | Float64 #

[View source]
def min_value=(min_value : Int32 | Float64) #

[View source]
def name : String #

[View source]
def name=(name : String) #

[View source]
def required : Bool #

[View source]
def required=(required : Bool) #

[View source]
def size : Int32 #

[View source]
def size=(size : Int32) #

[View source]
def valid? #

[View source]
def validate! #

[View source]
def value : U #

[View source]
def value=(value : U) #

[View source]