Notifications
Clear all

"Valid email required" returned on obscure but valid email address.

(@avairlabs)
New Member Registered

Hello. I have a user who is trying to create an account. His email is novel and ends in "[username]@x398.services". I can reproduce the issue as its returned as not a valid email address.  How is the email validated and can I adjust this to allow such an email address to pass.

 

Thanks!

ReplyQuote
Topic starter Posted : 08/01/2022 7:29 pm
Topic Tags
(@skaredcreations)
Prominent Member Admin

Hi,

there's a function "IsValidEmail" in /vendor/skaredcreations/combu/combu/Utils.php that uses a regular expression to validate an email address, the last part of the regexp pattern (that is "(\.[a-z]{2,3})") is what you're looking for.

We could eventually replace the regexp pattern with the following:

$regex = '/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]+)$/i';

FRANCESCO CROCETTI @ SKARED CREATIONS

ReplyQuote
Posted : 10/01/2022 10:11 am
Share: