Support » Plugin: Contact Form 7 » [Plugin: Contact Form 7] Hook for additional form validation?

  • I want to extend form validation. For example, since my plugin is storing form submissions to the DB, I would like to create a validation that checks if there has already been a submission with the same email or physical address. If it is an error, I would like to feed that back into CF7 error validation/error reporting mechanism.

    Looking at the code, classes.php validate() function, I see it looks for and applies filters 'wpcf7_validate_' . $fe['type'] associated with each type of form element which it gets by scanning the shortcode. But I’m looking to hook in a validation specific to a form but not necessarily specific to one field (I may want to check several fields together).

    Can you give me some advise on how I might accomplish this?

    Thanks very much.

Viewing 1 replies (of 1 total)
  • Plugin Author Takayuki Miyoshi


    The current version doesn’t have proper filter hook for form-level validation. I will revise the validation part of it in the next major version up (maybe released this spring). For the moment, please use wpcf7_validate_email.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Contact Form 7] Hook for additional form validation?’ is closed to new replies.