class Athena::Validator::Spec::MockContextualValidator
- Athena::Validator::Spec::MockContextualValidator
- Reference
- Object
Overview
A spec implementation of AVD::Validator::ContextualValidatorInterface
.
Allows settings the violations that should be returned. Defaults to no violations.
Included Modules
Defined in:
spec.crConstructors
Instance Method Summary
-
#at_path(path : String) : AVD::Validator::ContextualValidatorInterface
Appends the provided path to the current
AVD::ExecutionContextInterface#property_path
. -
#validate(value : _, constraints : Array(AVD::Constraint) | AVD::Constraint | Nil = nil, groups : Array(String) | String | AVD::Constraints::GroupSequence | Nil = nil) : AVD::Validator::ContextualValidatorInterface
:inherit:
-
#validate_property(object : AVD::Validatable, property_name : String, groups : Array(String) | String | AVD::Constraints::GroupSequence | Nil = nil) : AVD::Validator::ContextualValidatorInterface
:inherit:
-
#validate_property_value(object : AVD::Validatable, property_name : String, value : _, groups : Array(String) | String | AVD::Constraints::GroupSequence | Nil = nil) : AVD::Validator::ContextualValidatorInterface
:inherit:
-
#violations : AVD::Violation::ConstraintViolationListInterface
Returns any violations that have been generated so far in the context of
self
. - #violations=(violations : AVD::Violation::ConstraintViolationListInterface)
Instance methods inherited from module Athena::Validator::Validator::ContextualValidatorInterface
at_path(path : String) : AVD::Validator::ContextualValidatorInterface
at_path,
validate(value : _, constraints : Array(AVD::Constraint) | AVD::Constraint | Nil = nil, groups : Array(String) | String | AVD::Constraints::GroupSequence | Nil = nil) : AVD::Validator::ContextualValidatorInterface
validate,
validate_property(object : AVD::Validatable, property_name : String, groups : Array(String) | String | AVD::Constraints::GroupSequence | Nil = nil) : AVD::Validator::ContextualValidatorInterface
validate_property,
validate_property_value(object : AVD::Validatable, property_name : String, value : _, groups : Array(String) | String | AVD::Constraints::GroupSequence | Nil = nil) : AVD::Validator::ContextualValidatorInterface
validate_property_value,
violations : AVD::Violation::ConstraintViolationListInterface
violations
Constructor Detail
def self.new(violations : AVD::Violation::ConstraintViolationListInterface = AVD::Violation::ConstraintViolationList.new)
#
Instance Method Detail
def at_path(path : String) : AVD::Validator::ContextualValidatorInterface
#
Appends the provided path to the current AVD::ExecutionContextInterface#property_path
.
def validate(value : _, constraints : Array(AVD::Constraint) | AVD::Constraint | Nil = nil, groups : Array(String) | String | AVD::Constraints::GroupSequence | Nil = nil) : AVD::Validator::ContextualValidatorInterface
#
:inherit:
def validate_property(object : AVD::Validatable, property_name : String, groups : Array(String) | String | AVD::Constraints::GroupSequence | Nil = nil) : AVD::Validator::ContextualValidatorInterface
#
:inherit:
def validate_property_value(object : AVD::Validatable, property_name : String, value : _, groups : Array(String) | String | AVD::Constraints::GroupSequence | Nil = nil) : AVD::Validator::ContextualValidatorInterface
#
:inherit:
def violations : AVD::Violation::ConstraintViolationListInterface
#
Returns any violations that have been generated so far in the context of self
.