• I want the email field in the default WordPress comment to accept only {gmail.com},{icloud.com},and {yahoo.com}

    Someone help me out by giving me the validation code.

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I cannot offer specific code for this, but you could hook the ‘preprocess_comment’ filter and check the email within the passed data. If it’s inappropriate, you can just wp_die() with a message since the comment hasn’t been inserted yet. The user would have to use their browser’s back button to get back to the comment form.

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress default comment email field validation’ is closed to new replies.