Class: Forme::ErrorHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/forme/transformers/error_handler.rb

Overview

Default error handler used by the library, using an “error” class for the input field and a span tag with an “error_message” class for the error message.

Registered as :default.

Direct Known Subclasses

ErrorHandler::Bootstrap3, AfterLegend, Set

Defined Under Namespace

Classes: AfterLegend, Bootstrap3, Bootstrap5, Set

Instance Method Summary collapse

Instance Method Details

#call(tag, input) ⇒ Object

Return tag with error message span tag after it.



13
14
15
# File 'lib/forme/transformers/error_handler.rb', line 13

def call(tag, input)
  [tag, error_tag(input)]
end