Skip to content

Email Validation

Overview

  • Email Validation is a service that will send a form's current email input to one of our supported validation providers, and provide a response indicating whether that email was valid or not (in terms of both formatting and domain validation).
  • This feature requires correct configuration in your application.yml and a form field (ctx-form-field table) indicating that the field should have its input validated.
  • This feature is only supported through JMC's forms (setting up entries in ctx-form and ctx-form-field tables).
  • If running JMC through a browser, you can view the response from Experian in the network tab, and there will be logging in the JavaScript console expressing the result of the email validation request. The response from a provider is not directly logged by JMC.

Configuration

There is configuration for both JMC's email validation service and for any of the supported providers. Currently, the only supported provider is Experian, so that will be used as the example below.

JMC Configuration

Client Configs:

  • This configuration is located at openpos.clientConfiguration.defaultConfigs.EmailValidation.
  • There is only 1 needed config here:
Config name Purpose Possible Values
provider Specified the provider of email-domain validation that your business wants to use. experian

Server Configs:

  • Config located at openpos.email.enableDomainValidation, when set to true, will have supported screens and dynamic forms supplied with a validator for email domains.
  • Supported screens: optIntoAnonymousEmailMarketing and email receipt screens. Also supported on any dynamic form.

Provider Configuration

  • Configuration here can vary between providers. As stated above, here is Experian's config as an example.
  • The config is located at openpos.clientConfiguration.defaultConfigs.ExperianEmailValidationConfig.
Config name Purpose Possible Values
approvalCodes The list of Experian return codes that JMC will interpret to mean the email was validated. If this config is not specified, then 'verified' will be used as the one and only approval code.
experianEmailValidationApiKey The Business' API key that has been set up through Experian. N/A
emailValidationUrl Experian's URL for Email Validation. This is the URL that the http request will be directed at. N/A
timeout The time (in seconds) that must elapse after sending a request to Experian that will return a timeout response to the POS. An integer between 3 and 15.
enableLogging When set to true, the raw result from Experian will be logged to the Javascript console in the browser. true/false

Form Setup

  • As stated above, email validation is only supported by setting up a form field correctly on a form.

CTX_FORM_FIELD

  • The field must have the column FIELD_TYPE set to EMAIL.
  • When config is enabled at openpos.email.enableDomainValidation, a validator will be dynamically added to the email form element sent to the client
  • Additionally, the field can have a FIELD_TYPE of EMAIL_VALIDATION.
  • If this field type is set, regardless of the .yml config to enable this functionality, a domain validator will be added to the form-field.

Example:

"FORM_ID","FORM_FIELD_ID","EFFECTIVE_START_TIME","DISPLAY_ORDER","FIELD_TYPE","ADDITIONAL_STYLE","DEFAULT_VALUE","ENABLED","USE_TO_SEARCH","ICON_TYPE","REQUIRED","READ_ONLY","MIN_LENGTH","MAX_LENGTH","PATTERN","EFFECTIVE_VERSION","EFFECTIVE_END_VERSION","REQUIRED_OVERRIDABLE","EFFECTIVE_END_TIME","TAG_APP_ID","TAG_BUSINESS_UNIT_ID","TAG_DEVICE_ID","TAG_COUNTRY","TAG_STATE","TAG_STORE_TYPE","TAG_DEVICE_TYPE","TAG_BRAND"

  • "loyaltyEdit","email","2019-01-15 13:57:09.000000000","30","EMAIL",,,"1",,,"1","0",,,,"0",,,,"*","*","*","*","*","*","*","*"
  • "loyaltyEdit","email","2019-01-15 13:57:09.000000000","30","EMAIL_VALIDATION",,,"1",,,"1","0",,,,"0",,,,"*","*","*","*","*","*","*","*"