Skip to content

module Athena::Validator::Constraints::AbstractComparison(ValueType) #

Defines common logic for comparison based constraints, such as AVD::Constraints::GreaterThan, or AVD::Constraints::EqualTo.

Direct including types

Athena::Validator::Constraints::EqualTo(ValueType) Athena::Validator::Constraints::GreaterThan(ValueType) Athena::Validator::Constraints::GreaterThanOrEqual(ValueType) Athena::Validator::Constraints::LessThan(ValueType) Athena::Validator::Constraints::LessThanOrEqual(ValueType) Athena::Validator::Constraints::NotEqualTo(ValueType)

Constructors#

.new(value : ValueType, message : String = default_error_message, groups : Array(String) | String | Nil = nil, payload : Hash(String, String) | Nil = nil)#

View source

Methods#

abstract #default_error_message : String#

Returns the AVD::Constraint#message for this constraint.

View source

#value : ValueType#

Returns the expected value.

View source

#value_type : ValueType.class#

Returns the type of the expected value.

View source