Sha256: cc26c0e9fb0716e697680acdc59cef11048c54b96224336e408100dc48f860b6

Contents?: true

Size: 529 Bytes

Versions: 121

Compression:

Stored size: 529 Bytes

Contents

<%
  add_gem_component_stylesheet("error-message")

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

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

Version data entries

121 entries across 121 versions & 1 rubygems

Version Path
govuk_publishing_components-45.1.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-45.0.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.11.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.10.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.9.1 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.9.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.8.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.7.1 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.7.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.6.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.5.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.4.2 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.4.1 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.4.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.3.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.2.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.1.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-44.0.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-43.5.0 app/views/govuk_publishing_components/components/_error_message.html.erb
govuk_publishing_components-43.4.1 app/views/govuk_publishing_components/components/_error_message.html.erb