Call Today - 24/7 Emergency Services

Anti-Spam Test Page

Test Instructions

Test 1: Normal Submission (Should Work ✅)

1. Fill out the form below normally
2. Wait at least 3 seconds
3. Move your mouse around
4. Click Submit
Expected: Success message appears

Test 2: Fast Submission (Should Fail ❌)

1. Scroll down to the test form
2. Click the red "Test Bot Submit (Fast)" button immediately
3. This simulates a bot submitting within 100ms

Expected: Red blocked message appears with "Request validation failed"

Test 3: Honeypot Test (Should Fail ❌)

1. Fill form normally and wait 5+ seconds
2. Open browser console
3. Before submitting, paste and run:
// Fill the honeypot field
(function() {
  const honeypot = document.querySelector('input[name="website"]');
  if (honeypot) {
    honeypot.value = 'spam.com';
    // Trigger events to ensure value is captured
    honeypot.dispatchEvent(new Event('input', { bubbles: true }));
    honeypot.dispatchEvent(new Event('change', { bubbles: true }));
    console.log('Honeypot filled with:', honeypot.value);
    alert('Honeypot filled! Now submit the form.');
  } else {
    alert('Honeypot field not found!');
  }
})();
4. Now submit the form
Expected: Blocked message appears

Test 4: Touch Device Simulation (Should Work ✅)

1. Scroll down to the test form
2. Wait at least 3 seconds
3. Click the blue "Test Touch Submit (No Mouse)" button
4. This simulates a touch device user with touch activity but no mouse events

Expected: Green success message appears (touch users should not be penalized for lack of mouse activity)

Test 5: Inspect Payload

1. Open DevTools Network tab
2. Submit form normally
3. Click on the request to /api/forms/franchise-contact
4. View Payload tab
Expected: You should see an "antiSpam" object with timeDelta, mouseEventCount, etc.

Test Form