Is it possible to have a confirmation message during the form submission?

Is it possible to have a confirmation message during the form submission?

Hello,
We have some forms and all the fields are not mandatory.
Sometimes our clients when they add something then they hit the Enter button from the keyboard by fault.
Of course then the form is submitted.

Is there any way to create a confirmation message or an alert message like 'Are you sure you want to submit? Yes/No'