Skip to contents

Display a summary of form validation errors.

Usage

ds_error_summary(..., heading = "Feil i skjema", class = NULL)

Arguments

...

Error list items

heading

The heading text for the error summary

class

Additional CSS classes

Value

A Shiny tag object

Examples

ds_error_summary(
  heading = "There were errors in the form",
  htmltools::tags$li(ds_link("Name is required", href = "#name")),
  htmltools::tags$li(ds_link("Email is invalid", href = "#email"))
)
#> <ds-error-summary class="ds-error-summary">
#>   <h2>There were errors in the form</h2>
#>   <ul>
#>     <li>
#>       <a class="ds-link" href="#name">Name is required</a>
#>     </li>
#>     <li>
#>       <a class="ds-link" href="#email">Email is invalid</a>
#>     </li>
#>   </ul>
#> </ds-error-summary>