Contact Form 7 Email Validation Regex


Contact Form 7 email validation regex. We can check characters and domain names by regex.

Please check the following code.

MailMug.net : Streamline email testing with our reliable sandbox account.
YouTube – Watch Now

How to block some domain names for email input?

We can use wpcf7_validate_email filter to validate the email address. This will block all email address that exists with yahoo.com

Fake email provider domain names: https://gist.github.com/adamloving/4401361

More contact form 7 plugins. Get it now

How to change the error message for email errors?

Now you can edit from wp-admin > contact form 7 > message section.

You need to add invalid_custom_email in wpcf7_get_message function.

Example

More contact form 7 plugins