Title: Selectable Recipient Validation Error Workaround
Last modified: August 31, 2016

---

# Selectable Recipient Validation Error Workaround

 *  [akaricreative](https://wordpress.org/support/users/akaricreative/)
 * (@akaricreative)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/selectable-recipient-validation-error-workaround/)
 * After the new update v4.4
 * You cannot put [your-recipient] into the “To” field without it throwing a syntax
   error.
 * I think it is only validating for emails and doesn’t like the square brackets.
 * Anyway I turned off the validation as a quick workaround to get things working
   again.
 * File: contact-form-7/includes/config-validator.php
 * Code Snippet:
    $recipient = $components[‘recipient’]; $recipient = new WPCF7_MailTaggedText(
   $recipient, array( ‘callback’ => $callback ) ); $recipient = $recipient->replace_tags();
   $recipient = wpcf7_strip_newline( $recipient );
 *  /* This is causing problems to Selectable Recipients
    if ( ! $this->test_to_field_syntax(
   $recipient ) ) { $this->add_error( sprintf( ‘%s.recipient’, $template ), self::
   error_invalid_syntax ); } */
 *  $additional_headers = $components[‘additional_headers’];
    $additional_headers
   = new WPCF7_MailTaggedText( $additional_headers, array( ‘callback’ => $callback));
   $additional_headers = $additional_headers->replace_tags();
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

Viewing 1 replies (of 1 total)

 *  [MNetto](https://wordpress.org/support/users/netto/)
 * (@netto)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/selectable-recipient-validation-error-workaround/#post-7086944)
 * No need for a workaround. Putting [your-recipient] into the “To” field still 
   works. You need to make your-recipient field required.
 * [https://wordpress.org/support/topic/multiple-recipients-6](https://wordpress.org/support/topic/multiple-recipients-6)

Viewing 1 replies (of 1 total)

The topic ‘Selectable Recipient Validation Error Workaround’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [selectable recipients](https://wordpress.org/support/topic-tag/selectable-recipients/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * 1 reply
 * 2 participants
 * Last reply from: [MNetto](https://wordpress.org/support/users/netto/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/selectable-recipient-validation-error-workaround/#post-7086944)
 * Status: not resolved