Title: Contextual validation error message missing
Last modified: November 9, 2022

---

# Contextual validation error message missing

 *  [Little Boy Running](https://wordpress.org/support/users/mvauchel/)
 * (@mvauchel)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/contextual-validation-error-message-missing/)
 * Hi,
 * It appears that, on the latest versions of WordPress and Contact Form 7, the 
   contextual error messages do not display on validation errors. I’ve seen several
   support topics on the matter dating as far as 10 months ago with no reply. Is
   the project still alive?
 * Thank you!

Viewing 1 replies (of 1 total)

 *  Thread Starter [Little Boy Running](https://wordpress.org/support/users/mvauchel/)
 * (@mvauchel)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/contextual-validation-error-message-missing/#post-16211399)
 * After investigation the problem lies in a change in the way CF7 targets fields
   targeting starting with version 5.6.
 * **Before:** the field name is added as a class
    **After:** the field name is 
   added a data attribute
 * Plugins that add form tags to CF7 must change the way they build the HTML markup
   in order for the validation to work. With International Telephone Input for CF7
   this means modifying line 90 in includes/form-tag.php
 * **Before:**
    `'<span class="wpcf7-form-control-wrap %1$s"><input %2$s /><input%
   3$s /><input %5$s /><input %6$s /><input %7$s />%4$s</span>',`
 * **After:**
    `'<span class="wpcf7-form-control-wrap" data-name="%1$s"><input %
   2$s /><input %3$s /><input %5$s /><input %6$s /><input %7$s />%4$s</span>',`
 * Obviously changing the code in the plugin yourself is not a very good idea. Ideally
   the author should validate this kind of changes, make sure it doesn’t break anything
   else then publish a new release.

Viewing 1 replies (of 1 total)

The topic ‘Contextual validation error message missing’ is closed to new replies.

 * ![](https://ps.w.org/international-telephone-input-for-contact-form-7/assets/
   icon-256x256.png?rev=2277878)
 * [International Telephone Input for Contact Form 7](https://wordpress.org/plugins/international-telephone-input-for-contact-form-7/)
 * [Support Threads](https://wordpress.org/support/plugin/international-telephone-input-for-contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/international-telephone-input-for-contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/international-telephone-input-for-contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/international-telephone-input-for-contact-form-7/reviews/)

## Tags

 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * 1 reply
 * 1 participant
 * Last reply from: [Little Boy Running](https://wordpress.org/support/users/mvauchel/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/contextual-validation-error-message-missing/#post-16211399)
 * Status: not resolved