Skip to content

Commit da257ef

Browse files
committed
chore: update place of birth validation required field
1 parent 1ee43bc commit da257ef

File tree

1 file changed

+5
-0
lines changed
  • packages/core/src/App/Containers/Modals/complete-user-profile-modal

1 file changed

+5
-0
lines changed

packages/core/src/App/Containers/Modals/complete-user-profile-modal/validation.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ export const ValidationSchema = (is_svg: boolean, account_settings?: Record<stri
2424
}),
2525
otherwise: schema => schema,
2626
}),
27+
place_of_birth: Yup.string().when([], {
28+
is: () => !account_settings?.place_of_birth,
29+
then: schema => schema.required(localize('Place of birth is required.')),
30+
otherwise: schema => schema,
31+
}),
2732
citizen: Yup.string().when([], {
2833
is: () => !account_settings?.citizen,
2934
then: schema => schema.required(localize('Citizenship is required.')),

0 commit comments

Comments
 (0)