class Formify::Errors::ValidationError

Attributes

attribute[R]

Public Class Methods

new(form:) click to toggle source
Calls superclass method Formify::Errors::FormError::new
# File lib/formify/errors/validation_error.rb, line 6
def initialize(form:)
  @attribute = form.errors.first.first

  super(
    form: form,
    message: form.errors.full_messages_for(@attribute).first
  )
end