Form validation is not reset when the form is reset

I have a form. After the user submits it, I reset it using the reset method of the HTML form.
The validation is not reset and the user can submit the form with empty fields.

I have found a workaround, but it is not very nice.
I trigger the change event of the input fields and the validation works again, but it shows the fields red.
When the form is reset, everything should clear and the user should see a clear form while the validation should work.

Is this a bug or I am missing something ?

Thank you

Please provide additional details. To which Atlassian product are you adding a form? Which JavaScript libraries are you using, or how have you implemented your HTML form?