JavaScript Widget Reference - Email Verification
AddressfinderEmail.Email.Widget class
This page serves as a reference for the constructor, methods, options, and events available in the Email Verification Widget.
Constructor
Parameter | Type | Description | Example |
---|---|---|---|
addressSelector | String | CSS selector for one or more input elements. | input.email |
licence_key | String | Your unique licence key. | VYT6FHV6TPQEWNBG4K7Q |
options | Object | Configuration options, see the Options section below. | {"rules": {"unverified": "block", "message": "Email address cannot be verified. Check spelling and retry"}} |
Methods
Method | Parameter | Return value | Description |
---|---|---|---|
disable() | - | - | Disables the Addressfinder email widget. The verification function will stop working until the widget is re-enabled. |
enable() | - | - | Re-enables a disabled Addressfinder email widget. |
reactivate() | - | - | Executes the verification function on the input value. The Addressfinder email widget must be enabled. |
Options
Key | Type | Description | Default |
---|---|---|---|
rules.unverified.rule | String | Rule for unverified email addresses: block , warn or allow | block |
rules.unverified.message | String | Message to display to the user when an unverified email address is detected. | This email address could not be verified. Check spelling and retry. |
rules.disposable.rule | String | Rule for disposable email addresses: block , warn or allow . For example, test.account@mailinator.com is a disposable email address. | block |
rules.disposable.message | String | Message to display to the user when a disposable email address is detected. | Disposable email addresses are not permitted. |
rules.role.rule | String | Rule for role email addresses: block , warn or allow . For example, accounts@topshop.com.au is a role email address. | allow |
rules.role.message | String | Message to display to the user when a role email address is detected. | - |
rules.public.rule | String | Rule for public email addresses: block , warn or allow | allow |
rules.public.message | String | Message to display to the user when a public email address is detected. | - |
check | String | Controls the methods of verification to be completed. domain is a check to verify that the domain of the email address has the expected DNS records. connection is a check to verify that the email account exists at the provided domain. This will impact the query processing time and data returned in the response. Use a comma to separate multiple values. | domain,connection |
provider | Boolean | Requests that the base domain of underlying email service provider is returned in the response. | false |
container | DOM element | Element into which the loading indicators and error messages are injected. | - |
Events
Events | Callback arguments | Description |
---|---|---|
result:verified | metadata:Object | Fired when the widget receives a response from the API that aligns with the permissions (allow , warn , block ) defined in the widget's rules. e.g. Email is verified. |
result:not_verified | metadata:Object | Fired when the widget receives a response from the API that conflicts with the permissions (allow , warn , block ) defined in the widget's rules. e.g. Email is disposable. |
Are you looking for something not documented on this page? Reach out to support@addressfinder.com and let us help.