Skip to content

abstract class Athena::Validator::Constraints::ComparisonValidator
inherits Athena::Validator::ConstraintValidator #

Defines common logic for comparison based constraint validators.

Direct known subclasses

Athena::Validator::Constraints::EqualTo::Validator Athena::Validator::Constraints::GreaterThan::Validator Athena::Validator::Constraints::GreaterThanOrEqual::Validator Athena::Validator::Constraints::LessThan::Validator Athena::Validator::Constraints::LessThanOrEqual::Validator Athena::Validator::Constraints::NotEqualTo::Validator

Methods#

abstract #compare_values(actual : _, expected : _) : Bool#

Returns true if the provided actual and expected values are compatible, otherwise false.

View source

abstract #error_code : String#

Returns the expected error code for self.

View source

#validate(value : _, constraint : AVD::Constraints::AbstractComparison) : Nil#

:inherit:

View source