Skip to content

Commit

Permalink
Only require spouse's name for Married marital status
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminJohnson2204 committed Feb 24, 2024
1 parent 7637592 commit 8cfaa05
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/src/app/vsr/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,9 @@ const VeteranServiceRequest: React.FC = () => {
placeholder="e.g. Jane Timberlake"
{...register("spouse", {
required:
["Married", "Widowed/Widower"].includes(watch().marital_status) &&
"Spouse's Name is required",
watch().marital_status === "Married" && "Spouse's Name is required",
})}
required={["Married", "Widowed/Widower"].includes(watch().marital_status)}
required={watch().marital_status === "Married"}
error={!!errors.spouse}
helperText={errors.spouse?.message}
/>
Expand Down

0 comments on commit 8cfaa05

Please sign in to comment.