diff --git a/src/components/dashboard/machinary-office/Form/ConfirmForm.jsx b/src/components/dashboard/machinary-office/Form/ConfirmForm.jsx index 754abce..4e7ac76 100644 --- a/src/components/dashboard/machinary-office/Form/ConfirmForm.jsx +++ b/src/components/dashboard/machinary-office/Form/ConfirmForm.jsx @@ -41,7 +41,9 @@ const ConfirmForm = ({ open, handleClose, rowId, confirmData }) => { setDescription(event.target.value); }; const handleAmountChange = (event) => { - setProposedAmount(event.target.value); + if (/^\d*$/.test(event.target.value)) { + setProposedAmount(event.target.value); + } formik.handleChange(event); }; @@ -65,6 +67,11 @@ const ConfirmForm = ({ open, handleClose, rowId, confirmData }) => { name="proposed_amount" label={t("MachinaryOffice.proposed_amount")} type="number" + inputProps={{ + min: 0, + inputMode: "numeric", + pattern: "[0-9]*", + }} variant="outlined" value={proposedAmount} onChange={handleAmountChange}