Validation Script for Email type where UI Type is selected as "Service portal / All" does not work, allowing records to be saved with incorrect email addresses.

Steps to Reproduce


  1. Check the validation script is true for Email type for Mobile/Service portal.
  2. Go to 'New Email Account' catalog item in portal.
  3. Enter an invalid email.
  4. Submit.

    Notice no "Invalid Email Address" error message is shown. The record is saved without validating the email address input.


This problem has been identified as a future possible product enhancement. You can subscribe to this Known Error article by clicking the Subscribe button at the top right of this form to be notified when more information will become available.

As a workaround, any validation of an email field can be done via onSubmit Catalog Client Script:

function onSubmit() {
//Type appropriate comment here, and begin script below
 var newEmail = g_form.getValue('<fieldname>');

 function isValidEmail(email) {
  return !!email.toString().match(/(^[a-z0-9]([0-9a-z\-_\.]*)@([0-9a-z_\-\.]*)([.][a-z]{3})$)|(^[a-z]([0-9a-z_\.\-]*)@([0-9a-z_\-\.]*)(\.[a-z]{2,5})$)/i);

 if(!isValidEmail(newEmail)) {
  g_form.addErrorMessage('Invalid email.');
  return false;
 } else {
  return true;

Related Problem: PRB1302806

Seen In

SR - ITOM - Discovery and Service Mapping - 201908

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-06-15 11:21:50