I am stuck at this point on it though and any assistance would be great. Basically it errors on any domain telling me I need to use a business email address. This should only happen if they input one of the freemail addresses.
<script>
jQuery(document).ready(function() {
jQuery(".infusion-form").validate({
rules: {
inf_field_Email: {
required: true,
restrictEmail: true
}
}
});
});
jQuery.validator.addMethod("restrictEmail", function(value, element) {
// do not accept from certain domains
return this.optional(element) || /^@gmail@yahoo@hotmail@live@aol@outlook@icloud@me/.test( value );
}, 'Must be a business email.');
</script>