wpcf7_get_validation_error

The Contact Form 7 wpcf7 get validation error function.

Description

wpcf7_get_validation_error( (string) $name ); 

Parameters (1)

0. $name (string)
The name.

Usage

  1. if ( !function_exists( 'wpcf7_get_validation_error' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/includes/contact-form-functions.php'; 
  3.  
  4. // The name. 
  5. $name = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wpcf7_get_validation_error($name); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/contact-form-functions.php  
  1. function wpcf7_get_validation_error( $name ) { 
  2. if ( ! $contact_form = wpcf7_get_current_contact_form() ) { 
  3. return ''; 
  4.  
  5. return $contact_form->validation_error( $name );