What email validation pattern is used in DraftOrder REST API?

What email validation pattern is used in DraftOrder REST API?

moaazbhnas228
Shopify Partner
11 2 5

In our website, we use DraftOrder REST API to create draft order for customers after they add items to their cart and fill in their shipping details.

 

In the checkout form, we validate the email input using a regex that accepts all types of domains.

The issue with that regex that it doesn't the validation pattern that you use in "Create Draft Order" API endpoint, so a lot of our customers fail to create a draft order.

 

can you please share with us the email validation pattern that you use in your endpoint, so we can use it too in our website to fix this issue?

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 508

Hi @moaazbhnas228,

 

Thanks for your post. We're not able to share that kind of information but if you have some examples of email addresses that should be working and are not you could submit a report through the Partner dashboard about it to maintain the privacy of the email addresses.

 

From the Partner dashboard there's a support link on the left, and if you go through and choose the API Support option you can submit an email report about it.

 

Hope you have a great day,
Jon551

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog