mdash
Giga Guru

Hi,

This should work for you.

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading || newValue === '') {
        return;
    }
    var email = g_form.getValue('email');

    var re = /^(([^<>()[\]\\.,;:\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,}))$/;

    var isValidFormat = re.test(email);

    if (!isValidFormat) {

        g_form.showFieldMsg('email', 'Invalid Email', 'error');

    }
}


Please mark my answer as helpful/correct depending on its impact.

Thank You