Configuration

API Key

Command: verifyforge('apiKey', key)

Set your Public API key. This is required for the widget to work.

verifyforge('apiKey', 'your_public_api_key');

Allow Configuration

Command: verifyforge('allow', config)

Control which email types are accepted.

verifyforge('allow', {
  states: ['deliverable', 'risky', 'unknown'],
  free: true,
  role: true,
  disposable: false
});

Options

  • states (array) - Array of allowed validation states

    • 'deliverable' - Email is valid and deliverable
    • 'risky' - Email may have issues but could be valid
    • 'invalid' - Email is definitely invalid
    • 'unknown' - Validation status cannot be determined
    • Default: ['deliverable', 'risky', 'unknown']
  • free (boolean) - Allow free email providers (Gmail, Yahoo, etc.)

    • Default: true
  • role (boolean) - Allow role-based emails (info@, support@, etc.)

    • Default: true
  • disposable (boolean) - Allow disposable/temporary email addresses

    • Default: false

Timing Options

Verify After Delay

Command: verifyforge('verifyAfterDelay', milliseconds)

Set how long to wait after the user stops typing before validating.

verifyforge('verifyAfterDelay', 1000);  // Wait 1 second

Default: 1000 (1 second)

Verification Timeout

Command: verifyforge('verificationTimeout', milliseconds)

Maximum time to wait for API response before timing out.

verifyforge('verificationTimeout', 5000);  // 5 second timeout

Default: 5000 (5 seconds)

Form Options

Form Validation

Command: verifyforge('formValidation', enabled)

Enable or disable HTML5 form validation integration.

verifyforge('formValidation', true);

When enabled, the widget will use setCustomValidity() to integrate with HTML5 form validation.

Default: true

Input Selector

Command: verifyforge('inputSelector', selector)

CSS selector for email inputs to validate.

verifyforge('inputSelector', 'input[type="email"]');

Default: 'input[type="email"]'

Ignored Forms

Command: verifyforge('ignoredForms', names)

Array of form names to ignore.

verifyforge('ignoredForms', ['newsletter-form', 'quick-signup']);

Default: []

Ignored Inputs

Command: verifyforge('ignoredInputs', names)

Array of input names to ignore.

verifyforge('ignoredInputs', ['backup-email', 'optional-email']);

Default: []

UI Options

Status Append To

Command: verifyforge('statusAppendTo', target)

Where to append the status message element.

// Append to a specific element
verifyforge('statusAppendTo', '#email-status-container');

// Or use default (after the input)
verifyforge('statusAppendTo', 'body');

Default: 'body' (appends after the input element)

Style

Command: verifyforge('style', styleConfig)

Customize the widget's visual appearance.

verifyforge('style', {
  loadingIconColor: '#6366f1'
});

Options:

  • loadingIconColor (string) - Color of the loading spinner
    • Default: '#6366f1'

Messages

Command: verifyforge('messages', messages)

Customize validation messages.

verifyforge('messages', {
  invalid: 'Please enter a valid email address.',
  disposable: 'Temporary email addresses are not allowed.',
  role: 'Please use your personal email address.',
  free: 'Please use a business email address.',
  verifying: 'Verifying email...',
  rateLimited: 'Too many validation attempts. Please try again later.',
  didYouMean: 'Did you mean {suggestion}?'
});

Available Messages

  • invalid - Shown when email format is invalid
  • disposable - Shown when disposable email is blocked
  • role - Shown when role-based email is blocked
  • free - Shown when free provider email is blocked
  • verifying - Shown while validating
  • rateLimited - Shown when rate limit is reached
  • didYouMean - Shown for typo suggestions (use {suggestion} placeholder)

Rate Limiting

Block On Rate Limit

Command: verifyforge('blockOnRateLimit', enabled)

Whether to show error when rate limit is reached.

verifyforge('blockOnRateLimit', true);

Default: true

Get Widget Version

Command: verifyforge('version')

Returns the current widget version.

const version = verifyforge('version');
console.log('Widget version:', version);

Complete Example

Here's a complete example with all common options configured:

<script src="https://verifyforge.com/widget/verifyforge.min.js"></script>
<script>
  // Set API key
  verifyforge('apiKey', 'your_public_api_key');

  // Configure allowed email types
  verifyforge('allow', {
    states: ['deliverable', 'risky'],
    free: false,        // Block free emails
    role: false,        // Block role emails
    disposable: false   // Block disposable emails
  });

  // Customize messages
  verifyforge('messages', {
    invalid: 'Please enter a valid business email address.',
    free: 'Please use your company email address.',
    role: 'Please use your personal work email.',
    disposable: 'Temporary emails are not accepted.'
  });

  // Configure timing
  verifyforge('verifyAfterDelay', 800);
  verifyforge('verificationTimeout', 8000);

  // Form options
  verifyforge('formValidation', true);
  verifyforge('ignoredForms', ['newsletter']);

  // UI customization
  verifyforge('style', {
    loadingIconColor: '#10b981'
  });
</script>