Class: Forms::Plain::FieldError

Inherits:
FieldError
  • Object
show all
Defined in:
lib/forms/plain/field_error.rb

Overview

Inline validation error: no styling classes, stable hooks only (role="alert" + data-field-error).

Instance Method Summary collapse

Instance Method Details

#view_templateObject



8
9
10
11
12
# File 'lib/forms/plain/field_error.rb', line 8

def view_template
  return unless @message

  p(role: "alert", data: { field_error: true }, **@options) { @message }
end