Error Summary

ErrorSummary shows a list of errors that occured on the last submission attempt. These errors can be clicked to focus on the inputs that have validation errors.

ErrorSummary will also pass a context area to your validation element, eg props.context.area will equal "summary"

import { EmailValidator } from "./EmailValidation" export const MyApp = () => {  return (    <Form      onSubmit={async () => {        await new Promise((resolve) => setTimeout(resolve, 1000))        throw FormError("NETWORK_ERROR", <div>Network error</div>)      }}    >      <ErrorSummary />      <h3>My example form</h3>      <p>My form description</p>      <Label prop="email" label="Email">        <Input type="email" placeholder="john@snow.com">          <EmailValidator />        </Input>        <Validations />      </Label>      <Submit />      <Log />    </Form>  )} 
Loading...