Skip to content

Instantly share code, notes, and snippets.

@richardW8k
Created September 8, 2017 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richardW8k/783ba9c208f5ad172e2fd20c7179150e to your computer and use it in GitHub Desktop.
Save richardW8k/783ba9c208f5ad172e2fd20c7179150e to your computer and use it in GitHub Desktop.
add_filter( 'gform_field_validation', function ( $result, $value, $form, $field ) {
if ( ! $result['is_valid'] && $field->get_input_type() === 'email' && GFCommon::is_valid_email_list( $value ) ) {
$result['is_valid'] = true;
$result['message'] = '';
}
return $result;
}, 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment