class
Marten::Core::Validation::Error
- Marten::Core::Validation::Error
- Reference
- Object
Overview
Represents a validation error.
Included Modules
Defined in:
marten/core/validation/error.crmarten/template/ext/marten/core/validation/error.cr
Constructors
Instance Method Summary
- #field : String?
- #message : String
-
#to_json(json : JSON::Builder) : Nil
Serializes the error to JSON.
- #type : String
Macros inherited from module Marten::Template::CanDefineTemplateAttributes
template_attributes(*names)
template_attributes
Constructor Detail
def self.new(message : String, type : String | Symbol, field : Nil | String | Symbol = nil)
#