diff --git a/src/components/dashboard/navgan/show/form/UpdateForm.jsx b/src/components/dashboard/navgan/show/form/UpdateForm.jsx index 955ccb1..871c9a2 100644 --- a/src/components/dashboard/navgan/show/form/UpdateForm.jsx +++ b/src/components/dashboard/navgan/show/form/UpdateForm.jsx @@ -393,7 +393,20 @@ const UpdateForm = ({LoanDetails, LoanId}) => { placeholder={t( "ShowLoan.text_field_enter_your_postal_code" )} + value={props.values.postal_code} type={'tel'} + onChange={(event) => { + const inputValue = event.target.value; + if (isNaN(Number(inputValue))) { + return; + } + props.handleChange({ + target: { + name: "postal_code", + value: inputValue, + }, + }); + }} error={!!(props.touched.postal_code && props.errors.postal_code)} fullWidth helperText={ @@ -497,10 +510,21 @@ const UpdateForm = ({LoanDetails, LoanId}) => { sx={{width: "100%"}} name="telephone_number" variant="outlined" - type={'tel'} size="small" + type={'tel'} value={props.values.telephone_number} - onChange={props.handleChange} + onChange={(event) => { + const inputValue = event.target.value; + if (isNaN(Number(inputValue))) { + return; + } + props.handleChange({ + target: { + name: "telephone_number", + value: inputValue, + }, + }); + }} label={t("ShowLoan.text_field_tel_number")} placeholder={t( "ShowLoan.text_field_enter_your_tel_number"