def full_message(attribute, message)
      return message if attribute == :base || !@base.class.respond_to?(:model_name)

      attr_name = attribute.to_s.tr('.', '_').humanize
      attr_name = @base.class.human_attribute_name(attribute, default: attr_name)
      I18n.t(:"errors.format", {
        default:  "%{attribute} %{message}",
        attribute: attr_name,
        message:   message
      })
    end
def full_message(attribute, message)
      return message if attribute == :base || !@base.class.respond_to?(:model_name)

      attr_name = attribute.to_s.tr('.', '_').humanize
      attr_name = @base.class.human_attribute_name(attribute, default: attr_name)
      I18n.t(:"errors.format", {
        default:  "%{attribute} %{message}",
        attribute: attr_name,
        message:   message
      })
    end
Returns a full message for a given attribute.

   person.errors.full_message(:name, 'is invalid') # => "Name is invalid"