Class: Ukiryu::Validation::ValidationIssue
- Inherits:
-
StandardError
- Object
- StandardError
- Ukiryu::Validation::ValidationIssue
- Defined in:
- lib/ukiryu/validation/constraints.rb
Overview
Validation issue represents a single validation problem
This is a proper error object, not just a string.
Constant Summary
Constants inherited from StandardError
Instance Attribute Summary collapse
-
#attribute_name ⇒ Object
readonly
The attribute name that failed validation.
-
#message ⇒ Object
readonly
Human-readable error message.
-
#validation_type ⇒ Object
readonly
The type of validation that failed.
Instance Method Summary collapse
-
#initialize(attribute_name, validation_type, message) ⇒ ValidationIssue
constructor
A new instance of ValidationIssue.
Methods inherited from StandardError
Constructor Details
#initialize(attribute_name, validation_type, message) ⇒ ValidationIssue
Returns a new instance of ValidationIssue.
273 274 275 276 277 278 |
# File 'lib/ukiryu/validation/constraints.rb', line 273 def initialize(attribute_name, validation_type, ) @attribute_name = attribute_name @validation_type = validation_type @message = super() end |
Instance Attribute Details
#attribute_name ⇒ Object (readonly)
The attribute name that failed validation
262 263 264 |
# File 'lib/ukiryu/validation/constraints.rb', line 262 def attribute_name @attribute_name end |
#message ⇒ Object (readonly)
Human-readable error message
268 269 270 |
# File 'lib/ukiryu/validation/constraints.rb', line 268 def @message end |
#validation_type ⇒ Object (readonly)
The type of validation that failed
265 266 267 |
# File 'lib/ukiryu/validation/constraints.rb', line 265 def validation_type @validation_type end |