Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Contact Form Editor: email address with 2 hyphens is seen as invalid #25030

Closed arcangelinis closed 5 years ago

arcangelinis commented 6 years ago

Steps to reproduce

  1. Starting at URL: https://wordpress.com/page/brilliant--basics.com/2
  2. Edit the Contact Form from the Visual tab and then click Settings
  3. Under "Enter your email address" use orders@brilliant--basics.com
  4. You will receive an error stating "orders@brilliant--basics.com is not a valid email address." and will not be allowed to save

What I expected

This is a valid email address and a valid website, but the double hyphen is being flagged as not valid.

Work around

By using the Contact Form shortcode I was able to set the email address without any issues

Screenshot / Video

edit_page_ _brilliant_basics_ _wordpress_com edit_page_ _brilliant_basics_ _wordpress_com
designsimply commented 6 years ago

Tested and confirmed that I am unable to change a contact form settings email address to an address using a domain with two hyphens in a row such as domainwith--twohyphens.com.

screen shot 2018-05-24 at thu may 24 11 03 13 am

Seen at https://wordpress.com/post/design5279.wordpress.com/12140 using Firefox 60.0.1 on macOS 10.13.4.

hermawan22 commented 6 years ago

Hi, i also can reproduce this issue.

And i think this from third party library. I just create a PR on third party library to fix this issue https://github.com/manishsaraan/email-validator/pull/33

But any other options, to make it fix asap instead wait my PR to be merge? Thanks.

hermawan22 commented 6 years ago

My PR already merged https://github.com/manishsaraan/email-validator/pull/33 Hopefully can fix this issue.

stale[bot] commented 5 years ago

This issue has been marked as stale and will be closed in seven days. This happened because:

You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation.