My Validation Code Was Fine. It Just Never Ran A developer building a first JavaScript portfolio site traced a contact-form bug to the browser's native constraint validation, not to faulty custom validation code. Because an with a malformed value fails the browser's built-in check, the submit event never fired and the custom handler never ran; adding novalidate to the form let the handler run every time, and required attributes were later added for accessibility without restoring the browser tooltips. I built my portfolio site as my first JavaScript project, working with an AI design partner for review. The live site https://tarek-elzoghby.github.io/frontend-portfolio/ and the repo https://github.com/Tarek-Elzoghby/frontend-portfolio are public. It has a contact form with custom validation: my own code checks each field and writes its own error message under it. This post is about one bug in that form, and the wrong place I went looking for it. A few days after I called the site finished, I was testing it on my phone. I typed an invalid email address, one with the wrong format, and pressed send. The message that appeared was not mine. It was the browser's own small tooltip, in the browser's wording and style. I had written code for exactly this case, so I tried an empty email field to see whether my messages were broken everywhere or only in this one situation. With the field empty, my message appeared, in my wording, under the field. At the time I read that as pointing at my format check. Empty worked, wrong format didn't, so the format code must be the problem. My isEmail function has three branches: empty, wrong format, and valid. The wrong-format branch was the one not showing, so I read through it. I read validate as well. Everything looked correct, and I couldn't find anything wrong with either one. I worked out that my code wasn't wrong. It wasn't running at all. My validation lives in a submit handler on the form: js form.addEventListener 'submit', event = { event.preventDefault ; // validate name, message and email, then send } ; When someone presses the submit button, the browser runs its own validation first, using the rules built into each input. An