Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
feat: add invalid state after invalid submission attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
bddjong committed Jul 9, 2023
1 parent f375e8a commit 6c77347
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pages/persoonsgegevens/[person].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { serverSideTranslations } from "next-i18next/serverSideTranslations";
import React, { useCallback, useContext, useEffect, useId, useRef, useState } from "react";
import { useForm, UseFormRegister } from "react-hook-form";
import Skeleton from "react-loading-skeleton";
import { Aside, Checkbox2, OptionalIndicator, PageContentMain, ReservationCard } from "../../src/components";
import { Aside, Checkbox2, PageContentMain, ReservationCard } from "../../src/components";
import { AddressDataList } from "../../src/components/huwelijksplanner/AddressDataList";
import { PageFooterTemplate } from "../../src/components/huwelijksplanner/PageFooterTemplate";
import { PageHeaderTemplate } from "../../src/components/huwelijksplanner/PageHeaderTemplate";
Expand Down Expand Up @@ -212,6 +212,7 @@ export default function MultistepForm1() {
id="tel"
type="tel"
autoComplete="tel"
invalid={formState.errors.phoneNumber && formState.isSubmitted}
{...register("phoneNumber", { required: true })}
/>
</FormField>
Expand All @@ -230,6 +231,7 @@ export default function MultistepForm1() {
type="email"
autoComplete="email"
aria-describedby="email-description"
invalid={formState.errors.email && formState.isSubmitted}
{...register("email", { required: true })}
/>
</FormField>
Expand Down

0 comments on commit 6c77347

Please sign in to comment.