Skip to content

Commit

Permalink
fix(web): make spaces and buildings selection required in urban proje…
Browse files Browse the repository at this point in the history
…ct form
  • Loading branch information
cdhenin committed Oct 30, 2024
1 parent 69cfd02 commit c232a9f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ function BuildingsUseSelection({ onSubmit, onBack }: Props) {
<Controller
control={control}
name="buildingsUseCategories"
rules={{ required: "Veuillez sélectionner au moins un type d'usage." }}
render={({ field }) => {
const isSelected = field.value.includes(value);
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function UrbanGreenSpacesSelection({ onSubmit, onBack }: Props) {
key={value}
control={control}
name="greenSpaces"
rules={{ required: "Veuillez sélectionner au moins un type d'espace." }}
render={({ field }) => {
const isSelected = field.value.includes(value);
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function LivingAndActivitySpacesSelection({ onSubmit, onBack }: Props) {
key={value}
control={control}
name="livingAndActivitySpaces"
rules={{ required: "Veuillez sélectionner au moins un type d'espace." }}
render={({ field }) => {
const isSelected = field.value.includes(value);
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ function SpacesCategoriesSelection({ onSubmit, onBack }: Props) {
<Controller
control={control}
name="spaceCategories"
rules={{ required: "Veuillez sélectionner au moins un type d'espace." }}
render={({ field }) => {
const isSelected = field.value.includes(value);
return (
Expand Down

0 comments on commit c232a9f

Please sign in to comment.