Buy Now
Sign in

Do not accept certain mail domains

senzaesclusiva , May 29 2021, 06:52
senzaesclusiva 16
May 29 2021, 06:52 #396580
I have seen the video that explains how to validate email domains with Regex

But how to do the exact opposite, i.e. deny those same domains?
Can the "Does NOT contain" field be useful, and if so, how do you enter multiple strings?
I don't know Regex, if someone can help me out with an example I would be very grateful.
GreyHead 65
May 29 2021, 12:25 #396582
Hi senzaesclusiva,
I've just looked at the video and it looks as if Does NOT contain should do what you need. The video example has multiple strings and I think the same format should work in the other box.
If you'd like to buy me a coffee or two, thank you very much
senzaesclusiva 16
May 29 2021, 13:45 #396587
Hy GreyHead
thanks for replay.
I've already tried entering in "Does NOT contain", multiple strings as per the example in the video, but it doesn't seem to work. I will try better and more carefully.

On the other hand, waiting to find the right and more robust solution, I tried to concatenate the strings as I do in Drupal CMS (I'm learning Chronoform on WP just to help a friend who is particularly bad at it).
Basically I put in "Does NOT contain": "gmail", "yahoo", "aol", "outlook" (and so on).
It seems to work: the field shows the error and the custom message, and if you submit, the form shows the error and blocks the submission.

I don't really trust series of strings put in a field; I'd prefer the opportunity to build an array, but for now it's fine.

Thanks again