Skip to content

Commit

Permalink
User yup schema
Browse files Browse the repository at this point in the history
  • Loading branch information
louptheron committed Jul 14, 2023
1 parent 969949a commit c9ac0b7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,6 @@ export const InfractionFormLiveSchema = object({
.required('Le type d’infraction est un champ obligatoire.'),
natinf: number().when('infractionType', {
is: (infractionType?: MissionAction.InfractionType) => infractionType !== MissionAction.InfractionType.PENDING,
then: number().required('Le NATINF est un champ obligatoire.')
then: schema => schema.required('Le NATINF est un champ obligatoire.')
})
})

0 comments on commit c9ac0b7

Please sign in to comment.