Hello
In May 2024, Unbounce launched the ability to use Regex Code to Verify Form Fields. A great addition; however, I noticed a potentially unintended result with regard to email verification.
The Problem:
To use Regex, you need to turn off ‘email verification’ and Regex alone doesn’t appear to handle both.
In the Unbounce Article Setting Up Form Field Validation with Regular Expressions it gives the following code as an example to verify email address domains:^(?!.*@(gmail\.com|yahoo\.com| hotmail\.com)).*$
To use this code, first you need to disable ‘verify as email address’ to allow Regex.
Entering the code above will indeed disallow @gmail addresses but is also doesn’t verify an email is input. The result is that “testgmail.com” and “test@gmailcom” in non-email formats are able to be submitted.
Troubleshooting:
I’m not well versed in writing Regex Code so I tried using GPT4.5 without a solution. Went back and forth for the better part of an hour with various attempts and no luck. In the end, I was curious if it was something about how Unbounce potentially implemented Regex for that field that is limiting the solution? Thus this post was born.
Solution:
I don’t have a current solution, so I’m curious if anyone in the community has come across a fix for this or came across the same issue?