function onChange(control, oldValue, newValue, isLoading) { if (isLoading || newValue == '') { return; } g_form.hideErrorBox('user_email'); var pattern =/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; // regex pattern if(!pattern.test(newValue)){ g_form.showErrorBox('user_email', getMessage('Invalid Email Address'));//show error messege g_form.setValue('user_email', ''); } }
Email Validation Client Script ServiceNow
admin Changed status to publish December 19, 2023