Skip to content

Commit

Permalink
fix: restore validation for self onboarding profile form
Browse files Browse the repository at this point in the history
  • Loading branch information
serikjensen committed Feb 21, 2025
1 parent 66138f8 commit a354144
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Employee/Profile/HomeAddress.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Alert, Checkbox, Grid, Select, TextField } from '@/components/Common'
import { EmployeeOnboardingStatus, STATES_ABBR } from '@/shared/constants'
import { STATES_ABBR } from '@/shared/constants'
import { Link, ListBoxItem } from 'react-aria-components'
import { useFormContext } from 'react-hook-form'
import { Trans, useTranslation } from 'react-i18next'
Expand All @@ -17,7 +17,7 @@ export const HomeAddressSchema = v.variant('self_onboarding', [
v.check(zip => /(^\d{5}$)|(^\d{5}-\d{4}$)/.test(zip)),
),
courtesy_withholding: v.boolean(),
self_onboarding: v.literal(false),
self_onboarding: v.union([v.literal(false), v.undefined()]),
}),
v.object({ self_onboarding: v.literal(true) }),
])
Expand Down

0 comments on commit a354144

Please sign in to comment.