I’d like to validate the last part of the domain name submitted in a WordPress Contact Form 7 email field. The validation condition is that the last part of the address domain (not the whole domain name) must match one of several values.

So for example I’d only like to validate addresses ending in “cabbage.com”, “peas.com” or “carrot.com”:

joe@turnip.tomato.cabbage.com

dave@parsnip.sprouts.peas.com

would both be OK, however

dave@yahoo.com

would fail.

Any ideas or pointers to code I could use?

Many thanks! 😀

A.

Read more here: WordPress Contact Form 7 email address validation


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: