Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
louptheron committed May 9, 2024
1 parent 6300661 commit be331dc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export const CONTROL_UNIT_CONTACT_FORM_SCHEMA = object().shape(
{
email: string().when('phone', {
is: phone => !phone,
then: shema => shema.required('Veuillez entrer un téléphone ou un email.')
then: schema => schema.required('Veuillez entrer un téléphone ou un email.')
}),
name: string().required('Veuillez choisir un nom.'),
phone: string().when('email', {
is: email => !email,
then: shema => shema.required('Veuillez entrer un téléphone ou un email.')
then: schema => schema.required('Veuillez entrer un téléphone ou un email.')
})
},
[['email', 'phone']]
Expand All @@ -21,6 +21,8 @@ export const CONTROL_UNIT_CONTACT_FORM_SCHEMA = object().shape(
export const INITIAL_CONTROL_UNIT_CONTACT_FORM_VALUES: ControlUnitContactFormValues = {
controlUnitId: undefined,
email: undefined,
isEmailSubscriptionContact: undefined,
isSmsSubscriptionContact: undefined,
name: undefined,
phone: undefined
}
Expand Down

0 comments on commit be331dc

Please sign in to comment.