class Kemal::FormValidator::NumberRange
Overview
Kemal::FormValidator::NumberRange
validates that a number is of a minimum and/or
maximum value, inclusive.
Adding this validator to a field will also add the #min
and/or #max
attribute to the field.
Defined in:
kemal-form/validators.crConstructors
Instance Method Summary
-
#max : Number::Primitive | Nil
Returns the maximum value of the number.
-
#min : Number::Primitive | Nil
Returns the minimum value of the number.
- #validate(field : Kemal::Form::Field)
Instance methods inherited from class Kemal::FormValidator::Validator
validate(field : Kemal::Form::Field)
validate
Constructor Detail
def self.new(min : Float32 | Float64 | Int128 | Int16 | Int32 | Int64 | Int8 | UInt128 | UInt16 | UInt32 | UInt64 | UInt8 | Nil = nil, max : Float32 | Float64 | Int128 | Int16 | Int32 | Int64 | Int8 | UInt128 | UInt16 | UInt32 | UInt64 | UInt8 | Nil = nil, message = "")
#