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

Overview

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

Direct including types

Defined in:

constraints/abstract_comparison.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]

Instance Method Detail

abstract def default_error_message : String #

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


[View source]
def value : ValueType #

Returns the expected value.


[View source]
def value_type : ValueType.class #

Returns the type of the expected value.


[View source]