Skip to content

Commit

Permalink
πŸ› not properly joined restrictions and yup upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
vokimon committed Oct 29, 2024
1 parent f6cf216 commit cb6fdb8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/containers/Indexed.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,10 @@ const Indexada = (props) => {
.oneOf([true], t('UNACCEPTED_TERMS')),
indexed_legal_terms_accepted: Yup.bool().when([], {
is: () => !isTariffIndexed,
then:
Yup.bool().required(t('UNACCEPTED_TERMS')) &&
Yup.bool().oneOf([true], t('UNACCEPTED_TERMS')),
then: (schema) =>
schema
.required(t('UNACCEPTED_TERMS'))
.oneOf([true], t('UNACCEPTED_TERMS')),
otherwise: Yup.bool().notRequired()
})
})
Expand Down

0 comments on commit cb6fdb8

Please sign in to comment.