DryValidation.Types.Integer (dry_validation v1.0.1)
Represents an integer type. Will try to cast strings into integer values.
DryValidation.schema do
required :age, Types.Integer
end
Summary
Functions
Validates that the input value is greater than the value of the first function argument.
Validates that the input value is greater than or equal to the value of the first function argument.
Validates that the input value is less than the value of the first function argument.
Validates that the input value is less than or equal to the value of the first function argument.
Functions
greater_than(value)
Validates that the input value is greater than the value of the first function argument.
DryValidation.schema do
required :age, Types.Integer.greater_than(18)
end
greater_than_or_equal(value)
Validates that the input value is greater than or equal to the value of the first function argument.
DryValidation.schema do
required :age, Types.Integer.greater_than_or_equal(18)
end
less_than(value)
Validates that the input value is less than the value of the first function argument.
DryValidation.schema do
required :age, Types.Integer.less_than(100)
end
less_than_or_equal(value)
Validates that the input value is less than or equal to the value of the first function argument.
DryValidation.schema do
required :age, Types.Integer.less_than_or_equal(100)
end