Form validation in html

One weird bug that I found with form validation.

August 05, 2022 β€’ Code

When there is onSubmit="someFunction(this)" in the the form element:

<form onSubmit="someFunction(this)">
    
    <!-- Some Code -->

</form>

The form validation doesn’t seem to work properly. However, once the onSubmit="someFunction(this)" is gone, the form validation works again.

Invely's