fix: make the number of suspension days required only when the
'Suspend' requirement is selected
This commit is contained in:
parent
bb9da7ff80
commit
b1ac484c0b
1 changed files with 4 additions and 1 deletions
|
|
@ -76,7 +76,10 @@ const threshold = Yup.object().shape({
|
|||
})
|
||||
const requirement = Yup.object().shape({
|
||||
requirement: Yup.string().required(),
|
||||
suspensionDays: Yup.number()
|
||||
suspensionDays: Yup.number().when('requirement', {
|
||||
is: 'suspend',
|
||||
then: Yup.number().required()
|
||||
})
|
||||
})
|
||||
|
||||
const Schema = Yup.object().shape({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue