Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2022 06:58 AM
Hi,
Try with below script.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
//If the page isn't loading
if (!isLoading)
{
if(newValue != '')
{
var oldV = oldValue;
var validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
var strEmail = g_form.getValue('u_company_official_email_id'); //here u_company_official_email_is is my field actual name
if (strEmail.search(validRegExp) == -1)
{
alert('A valid e-mail address is required eg:-abc@domain.com.');
g_form.setValue('u_company_official_email_id','oldV');
}
}
}
}
Please mark correct/helpful if this works for you.
Thanks,
Pooja M