AddressFinder.Email.Widget class
This widget adds email verification to a simple form field. It will check that the email address is valid and meets the configured criteria. If unverified, a cross icon and an error message are displayed. A verified email address is identified with a simple tick icon.
You can choose from block
, warn
or allow
behaviour for each of the
four types of email addresses. These include:
- Disposable emails, such as testing@mailinator.com
- Role addresses. These are typically group email addresses, such as accounts@business.com.au
- Public addresses with common email brands such as Gmail, BigPond, etc.
- Unverified addresses.
More information about how to configure these options and changing the visual styles can be found on the advanced options page. The code examples page demonstrates many of these configuration options.
Constructor
Parameter | Type | Description | Example |
---|---|---|---|
addressSelector |
String |
CSS selector for one or more input elements. | input.email |
licence_key |
String |
Your unique licence key (find on Portal credentials) | VYT6FHV6TPQEWNBG4K7Q |
options |
Object |
Configuration options, see the Options section below. |
{"rules": {"unverified": "block", "message": "Email address cannot be verified. Check spelling and retry"}}
|
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. | - |
container |
DOM element |
Element into which the loading indicators and error messages are injected. |