Frameworks and SDKs
Vue integration
Put the FormGuard component around a form in your Vue or Nuxt app and its email fields are checked when the visitor moves on, with a verdict event for your own code. A typo gets a fix the visitor can take with one click, and only the results you pick stop the form.
Read the full setup guideGet an API key
- Setup guide
- Two files, one component with a verdict event
<FormGuard browser-key="YOUR_BROWSER_KEY" @verdict="onVerdict">
<form action="/signup" method="post">
<input type="email" name="email" />
</form>
</FormGuard>At a glance.
- Status
- Setup guide. Not listed on a marketplace yet: you set it up yourself in a few steps, below and in the full guide.
- For
- Teams building with Vue 3 or Nuxt who want sign-up, newsletter and contact forms to catch an address that cannot receive mail before it reaches their backend.
- You need
- Vue 3.3 or later (Nuxt included), and a browser key made just for the site: only the Validate addresses permission, your site’s addresses as allowed origins, and a daily credit cap.
- Costs
- 1 credit = 1 validated address, as with any API request. Free: unknown results, API errors, malformed addresses and test addresses on sandbox.email-validation.org.
- Full guide
- Read the full setup guide
Typical uses.
React to each verdict
The verdict event fires each time a field’s verdict changes, with the address, its status, whether it stops the form, the message, any suggestion and the error when there was no answer.
Keep throwaway inboxes out
invalid and disposable results stop the form by default, each with its own short message. Change the messages to your own wording, or add catch_all to the results that stop.
Guard only the fields you mark
Set auto to false and only the fields marked data-ev-guard are guarded. Otherwise every email field on the page is, on every route of your app.
Set it up. 4 steps.
The short version of the full setup guide, which stays the reference when a step does not match what you see.
Download the files
There is no npm package yet: download the form guard files from the guide and copy core.ts and vue.ts from the zip’s src/ folder into one folder of your app.
Create a browser key
Under API keys, click Create API key and pick “On a public web page” (browser key) under “Where will you use this key?”: such a key can only validate addresses. Add your site and any test address as allowed origins, and a daily credit cap a little above a busy day’s sign-ups.
Add the component
Wrap your form in
<FormGuard>with your key inbrowser-key, and listen to@verdictif you want each result. Mark your log-in and password formsdata-ev-guard="off".Try the test addresses
no_mailbox@sandbox.email-validation.orgstops the form with a message,likely_typo@sandbox.email-validation.orgalso offers a fix, andaccepted@sandbox.email-validation.orggoes through. They cost nothing. On a form that mails the address, try only the ones that stop it.
Good to know.
Each address is checked at most once while the page is open: leaving the field again, pressing submit twice or a second form never pays for it again.
When something goes wrong (no answer in time, a refused key, no credits left, a network error), the field passes and the form submits, so no real sign-up is lost.
The key is in the page’s source and so public: anyone can copy it. The allowed origins keep other websites from using it in a browser, and the daily credit cap limits what it can spend.
For EU data residency, set
regiontoeuon every component of the page: the script reads it once, when it loads.The script sets no cookie, uses no browser storage and writes nothing to the console, except one warning when its key is not a browser key. Typo fixes never leave the browser.
Connect Vue.
Test it on our sandbox addresses for free, then on your own contacts.
Updated · Maintained by: Email Validation LLC