Validation Summary

The ValidationSummary component collects form issues into an accessible alert or status region.

Usage & Examples

Form Issues

form-issues.tsx
<ValidationSummary
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />

Visual variants

Themes

primary
secondary
tertiary
quaternary

States

success
warning
error
info

Variants

solid
outline
glass

Rounding

none
medium
large

Shadows

none
light
strong
visual-variants.tsx
// Themes
<ValidationSummary theme="primary"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />
<ValidationSummary theme="secondary"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />
<ValidationSummary theme="tertiary"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />
<ValidationSummary theme="quaternary"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />

// States
<ValidationSummary state="success"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />
<ValidationSummary state="warning"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />
<ValidationSummary state="error"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />
<ValidationSummary state="info"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />

// Variants
<ValidationSummary variant="solid"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />
<ValidationSummary variant="outline"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />
<ValidationSummary variant="glass"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />

// Rounding
<ValidationSummary rounding="none"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />
<ValidationSummary rounding="medium"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />
<ValidationSummary rounding="large"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />

// Shadows
<ValidationSummary shadow="none"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />
<ValidationSummary shadow="light"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />
<ValidationSummary shadow="strong"
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />

Interaction states

Disabled
Loading
interaction-states.tsx
// Disabled
<ValidationSummary disabled
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />
// Loading
<ValidationSummary loading
    title="Review these fields"
    description="Two fields need attention before continuing."
    items={[
      { id: "email", message: "Email is required.", href: "#email" },
      "Password must be at least 12 characters.",
    ]}
  />

Props API

40 props
Columns
Validation Summary props API
Default
Description
childrenReactNodeNoprops—Main content rendered inside the component after the generated validation list.
classNamestringNostyling—Additional class name for the component root.
containerClassNamestringNoprops—Additional class name for the outer label/component container.
contentClassNamestringNoprops—Additional class name for the content area.
data-testidstringNotesting—Backward-compatible alias for test ID attributes.
descriptionReactNodeNoprops—Supporting text rendered beneath the title.
descriptionClassNamestringNoprops—Additional class name for the description.
disabledbooleanNopropsfalseWhether the component is disabled.
emptyClassNamestringNoprops—Additional class name for empty-state text.
emptyMessageReactNodeNoprops—Message rendered when there are no validation items and hideWhenEmpty is false.
focusablebooleanNopropstrueWhether the summary should be focusable for programmatic focus.
focusOnMountbooleanNopropsfalseWhether the summary should focus itself when validation items are present.