function jqvalidate() {
    var errmsg = '';
    var jqform = this;
    var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

    // Reset validation color schemes
    $('.req, .email').each( function() {
        $('label[for="'+$(this).attr('id')+'"]', jqform).css('color', '');
    });

    $('.reqTele').each( function() {
        $('label[for="'+$(this).attr('id')+'"]', jqform).css('color', '');
    });

    // Required fields without values set
    $('.req:enabled[value=""], .req:enabled:checkbox:not(:checked)', jqform).each( function() {
        $('label[for="'+$(this).attr('id')+'"]', jqform).css('color', '#AA0000');
        errmsg += '* Required field missing: '+$('label[for="'+$(this).attr('id')+'"]', jqform).text().replace(':', '').replace('*', '')+"\n";
    });

    // Only one telephone number required
    if ($('#daytime').val() == '' && $('#mobile').val() == '') {
        $('label[for="'+$('#daytime').attr('id')+'"]', jqform).css('color', '#AA0000');
        $('label[for="'+$('#mobile').attr('id')+'"]', jqform).css('color', '#AA0000');
        errmsg += '* Required field missing: One telephone number is mandatory'+"\n";
    }

    // Validate email fields
    $('.email:enabled[value!=""]', jqform).each( function() {
        if (!filter.test($(this).val())) {
            $('label[for="'+$(this).attr('id')+'"]', jqform).css('color', '#AA0000');
            errmsg += '* Invalid email format: '+$('label[for="'+$(this).attr('id')+'"]', jqform).text().replace(':', '').replace('*', '')+"\n";
        }
    });

    // Check file types are not restricted
    $('.restricted:enabled:file[value!=""]', jqform).each( function() {
        if(!check_filename($(this).val())) {
            $('label[for="'+$(this).attr('id')+'"]', jqform).css('color', '#AA0000');
            errmsg += '* Attachment format incorrect: '+$('label[for="'+$(this).attr('id')+'"]', jqform).text().replace(':', '').replace('*', '')+"\n";
        }
    });

    // Display Error message and return success code
    if(errmsg.length>0) {
        alert(errmsg);
        return false;
    }

    return true;
}
