wordpress

WP Quickie: Custom CF7 Name Validation

by Jamal on February 03, 2014

If you’re at least slightly familiar with WordPress, then you’ve come across a need for a admin managed form generator. In more specific terms, you’ve come across the most popular plugin to achieve this in Contact Form 7(CF7). CF7 is a lot of great things and its documentation does a decent job of providing assistance. Well, except for name validation.

Now I’ve used CF7 quite a bit with the majority of client work and theme development, but the common issue I find is there being no built in name validation. So with the help of this comment from the plugin author, I was able to make a quick validation function for any input field with a name value containing the word name. See below.