# Spot the bug - #179: Email Signup Form

**URL:** <https://forum.kirupa.com/t/spot-the-bug-179-email-signup-form/683784>\
**Category:** web dev\
**Created:** [October 19, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-179-email-signup-form/683784 "2026-10-19T07:00:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quelly](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/quelly/32/31386_2.png) [@Quelly](https://forum.kirupa.com/u/Quelly)\
**Post date:** [October 19, 2026, 7:00am UTC](https://forum.kirupa.com/t/spot-the-bug-179-email-signup-form/683784/1 "2026-10-19T07:00:09Z")

</div>

Can you spot the form bug?

```html
<form>
  <label>Email</label>
  <input type="email" id="email">
  <button type="submit">Join</button>
</form>
<script>
  document.querySelector('form').addEventListener('submit', (e) => {
    if (!email.value.includes('@')) alert('invalid');
  });
</script>

```

Reply with what is broken and how you would fix it.
