Sha256: c7bdd7bc8ff4efaea58301b353f261b77b3c316630211bafd04c98b646eef1d4

Contents?: true

Size: 423 Bytes

Versions: 314

Compression:

Stored size: 423 Bytes

Contents

<%
  id ||= "error-message-#{SecureRandom.hex(4)}"
  classes ||= ''
  css_classes = %w( gem-c-error-message govuk-error-message )
  css_classes << classes if classes
  items ||= []

  if items.any?
    errors = items.map { |item| capture { item[:text] } }
    text = raw(errors.join("<br />"))
  end
%>
<%= tag.span id: id, class: css_classes do %>
  <span class="govuk-visually-hidden">Error:</span> <%= text %>
<% end %>

Version data entries

314 entries across 314 versions & 1 rubygems

Version Path
govuk_publishing_components-28.5.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-28.4.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-28.3.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-28.2.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-28.1.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-28.0.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-27.20.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-27.19.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-27.18.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-27.17.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-27.16.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-27.15.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-27.14.2 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-27.14.1 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-27.14.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-27.13.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-27.12.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-27.11.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-27.10.5 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-27.10.4 app/views/govuk_publishing_components/components/_error_message.html.erb