1. Home
  2. Integrations
  3. Sign-up form widget
  4. Squarespace

Add email validation to Squarespace forms

In Squarespace, paste the widget into Code Injection, in the Footer box. Squarespace form blocks have no custom attribute, so the snippet turns the widget on for every email field on the page.

Before you start

Code Injection needs a Squarespace Business plan or higher; the Personal plan does not include it.

Setup

  1. In the site dashboard open Settings, then Developer Tools, then Code Injection.
  2. Paste the snippet below into the Footer box and save.
  3. Reload the published site (not the editor).
  4. Open the published page (not the editor preview) and type jane@gmial.com into the field. You should see a suggestion to use gmail.com under it. Try x@mailinator.com to see the disposable-address error.
footer code
<script src="https://simpleverifier.com/widget.js" defer></script>
<script>
  // Turns the widget on for every email field on the page, including fields the builder adds later.
  function svAttachAll() {
    if (!window.SimpleVerifier) return;
    document.querySelectorAll('input[type="email"]').forEach(function (input) {
      SimpleVerifier.attach(input);
    });
  }
  document.addEventListener("DOMContentLoaded", function () {
    svAttachAll();
    new MutationObserver(svAttachAll).observe(document.body, { childList: true, subtree: true });
  });
</script>

Limits on Squarespace

  • On the Personal plan Code Injection is not available. Check addresses after the form is sent instead, with Zapier or Make.
  • It runs on the live site, not inside the page editor.
  • It applies to every email field on the site, including newsletter blocks. Change the selector in the snippet to target one form.
  • Blocking a submit relies on the browser's own form validation. If a builder sends the form with its own script instead, the hint under the field still appears but the form may go through, so test on the published page.

Check that the mailbox exists

The widget checks format, typos, throwaway domains and role addresses in the browser. It cannot tell whether a mailbox exists, because that needs an API key and anything in a web page can be read by visitors. For that, call the API from the server that receives the form. See the API docs, the full form widget page with Node, PHP and Python examples, and pricing.

Related: Squarespace contacts to email list, Zapier.

Common questions

Does it work on Squarespace's Personal plan?
No. The Personal plan has no Code Injection, so you cannot add the script. Use a Zapier or Make step on the form submission instead.
Will it check newsletter blocks and form blocks?
It checks any input of type email on the page, which includes both.
Does it block bad addresses?
By default it blocks format errors and disposable addresses and only suggests a fix for typos. You can change that with the block option on the widget page.
Is the form widget free?
Yes. The widget runs in the visitor's browser, needs no account or API key and has no usage limit. Checks that confirm the mailbox exists use the SimpleVerifier API from a server, which comes with Pro, Business and Agency, from $39/month.

All form platforms · All integrations

Clean your next list before it bounces

100 free email checks when you sign in with Google, no card. Then monthly plans from $9, or one flat price with fair use, never cut off.

100 free checks, no card Cancel anytime Secure payment by Stripe