diff --git a/apps/judicial-system/web/src/routes/Prosecutor/Indictments/Indictment/IndictmentCount.tsx b/apps/judicial-system/web/src/routes/Prosecutor/Indictments/Indictment/IndictmentCount.tsx index 4be8ae4dca49..e1c1c97dd10a 100644 --- a/apps/judicial-system/web/src/routes/Prosecutor/Indictments/Indictment/IndictmentCount.tsx +++ b/apps/judicial-system/web/src/routes/Prosecutor/Indictments/Indictment/IndictmentCount.tsx @@ -510,19 +510,17 @@ export const IndictmentCount: FC = ({ )} - { - let { value } = nextState - value = value.toUpperCase() - - return { ...nextState, value } - }} onChange={(event) => { removeErrorMessageIfValid( - ['empty', 'vehicle-registration-number'], + ['empty'], event.target.value, vehicleRegistrationNumberErrorMessage, setVehicleRegistrationNumberErrorMessage, @@ -538,7 +536,7 @@ export const IndictmentCount: FC = ({ }} onBlur={async (event) => { validateAndSetErrorMessage( - ['empty', 'vehicle-registration-number'], + ['empty'], event.target.value, setVehicleRegistrationNumberErrorMessage, ) @@ -547,19 +545,10 @@ export const IndictmentCount: FC = ({ vehicleRegistrationNumber: event.target.value, }) }} - > - - + errorMessage={vehicleRegistrationNumberErrorMessage} + hasError={vehicleRegistrationNumberErrorMessage !== ''} + required + />