© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Francisco Quintero
Software Engineer & Ruby on Rails Developer
event.preventDefault() should be use when the submit event is going to be handled somewhere else.
event.preventDefault()
You're example is simple but works as expected 😁
Chris Bongers
Looking to get into development? As a full-stack developer I guide you on this journey and give you bite sized tips every single day 👊
Yes indeed, in this case we want the form submit to go through if the validation is correct (native submit)