Verifox.init() Options
apiKeystringoptYour FoxGuard widget API key. Without a key, falls back to the public tier (4 verifications/day per device). Get yours at verifox.ai/dashboard/foxguard.
apiUrlstringoptVerifox API base URL the widget calls. Auto-detected from the widget.js <script src>, so you rarely need to set it — override only for self-hosted or proxied setups.
selectorstringoptCSS selector targeting the email inputs to protect. Supports any valid CSS selector — multiple with commas.
blockDisposablebooleanoptReject throwaway / temporary email services (Mailinator, Guerrilla Mail, 10MinuteMail, and 10,000+ others).
blockFreebooleanoptReject free consumer email providers: Gmail, Yahoo, Outlook, Hotmail, iCloud, etc. Use for B2B sign-up forms that require work emails.
blockSubmitbooleanoptAutomatically prevent the enclosing <form> from submitting while a blocked email (invalid / disposable / free) is present. Set false to handle submission yourself via onInvalid or data-verifox-status.
redHighlightbooleanoptApply a red border and light red background to the input field when validation fails. Matches the field's existing border-radius.
showTooltipbooleanoptRender a tooltip message directly below the email input on validation failure (or success if messages.valid is set).
lang"en" | "it" | "es" | "fr" | "de"optLanguage for the built-in default messages. Ignored if you provide custom messages.* values.
messages.disposablestringoptCustom tooltip copy shown when a disposable email is detected and blockDisposable is true.
messages.freestringoptCustom tooltip copy shown when a free provider is detected and blockFree is true.
messages.validstringoptOptional success message shown below the input when the email passes all checks. Leave empty to show nothing on success.
messages.warningstringoptShown for catch-all or risky emails that pass but may have deliverability issues.
onValid(e: { email: string; result: object }) => voidoptCallback fired when an email passes all validation checks. Use it to unlock form submit or show custom UI.
onInvalid(e: { email: string; reason: string; result: object }) => voidoptCallback fired when an email is blocked. reason is one of: 'disposable' | 'free' | 'invalid'. Use it to disable form submit.
onWarning(e: { email: string; result: object }) => voidoptCallback fired for risky emails that are not outright blocked (catch-all, role accounts).
1<!-- 1. Load the widget script -->2<script src="https://api.verifox.ai/v1/widget/widget.js"></script>34<!-- 2. Initialize with your config -->5<script>6 Verifox.init({7 apiKey: "foxkey_your_full_key",8 blockDisposable: true,9 blockFree: false,10 blockSubmit: true,11 showTooltip: true,12 redHighlight: true,13 lang: "en",14 messages: {15 disposable: "Disposable emails are not allowed.",16 free: "Please use a work email address.",17 valid: "Email looks good!",18 warning: "This email may not be deliverable."19 },20 onValid: function(e) { console.log("valid", e.email); },21 onInvalid: function(e) { console.log("blocked", e.email, e.reason); }22 });23</script>1// widget.js returns the FoxGuard JavaScript SDK.2// Once loaded, window.Verifox is available with these methods:34Verifox.init(options) // Initialize — call once on page load5Verifox.reattach() // Re-scan DOM for new inputs (SPA use)6Verifox.validate(email) // Manually validate an email string7Verifox.destroy() // Remove all listeners and tooltips