Skip to content

Commit

Permalink
required fields error translation
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpochat committed Feb 12, 2024
1 parent a19d4d0 commit cff2074
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions frontend/app/src/domains/production/views/BeefProductionForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ export default function BeefProductionForm({ callback }) {
<FormContainer onSuccess={validateProductionProperties} defaultValues={{ "animalLiveWeight": 400 }} >
<div className="form">
<div>
<TextFieldElement required name="animalIdentifier" label="Numéro d'identification de l'animal" variant="standard" />
<TextFieldElement required validation={{ required: 'Champ obligatoire'}} name="animalIdentifier" label="Numéro d'identification de l'animal" variant="standard" />
</div>
<div>
<SliderElement min={100} max={1000} step={50} required name="animalLiveWeight" label="Poids vif" variant="standard" />
<SliderElement min={100} max={1000} step={50} required validation={{ required: 'Champ obligatoire'}} name="animalLiveWeight" label="Poids vif" variant="standard" />
</div>
<div>
<DatePickerElement required name="birthDate" label="Date de naissance" variant="standard" />
<DatePickerElement required validation={{ required: 'Champ obligatoire'}} name="birthDate" label="Date de naissance" variant="standard" />
</div>
<div>
<TextFieldElement required name="birthPlace" label="Lieu de naissance" variant="standard" />
<TextFieldElement required validation={{ required: 'Champ obligatoire'}} name="birthPlace" label="Lieu de naissance" variant="standard" />
</div>
<div>
<DatePickerElement required name="slaughterDate" label="Date de l'abattage" variant="standard" />
<DatePickerElement required validation={{ required: 'Champ obligatoire'}} name="slaughterDate" label="Date de l'abattage" variant="standard" />
</div>
<div>
<ButtonGroup>
Expand Down

0 comments on commit cff2074

Please sign in to comment.