Skip to content

Commit

Permalink
add front end validation for number of beds
Browse files Browse the repository at this point in the history
  • Loading branch information
sriharsh05 committed Nov 15, 2023
1 parent d411946 commit dd101fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Components/Facility/AddBedForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ export const AddBedForm = (props: BedFormProps) => {
min={1}
max={100}
onChange={(e) => setNumberOfBeds(Number(e.value))}
error={
numberOfBeds > 100
? "Number of beds cannot be greater than 100"
: undefined
}
/>
</>
)}
Expand Down

0 comments on commit dd101fe

Please sign in to comment.