class Forme::ErrorHandler

  1. lib/forme/bs3.rb
  2. lib/forme/bs5.rb
  3. lib/forme/transformers/error_handler.rb
  4. show all
Superclass: Object

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.


Public Instance

  1. call

Public Instance methods

call(tag, input)

Return tag with error message span tag after it.

[show source]
   # File lib/forme/transformers/error_handler.rb
13 def call(tag, input)
14   [tag, error_tag(input)]
15 end