Octopoos / SEBLOD

Build high-end websites with SEBLOD®, a CCK for Joomla!
https://www.seblod.com
GNU General Public License v2.0
129 stars 54 forks source link

allow additional special characters in the local part of email validation #688

Closed MtnPavlas closed 1 year ago

MtnPavlas commented 1 year ago

In the email validation plugin, please allow additional special characters in the local part of email address (the part before @) as valid per RFC standards, i.e. allow the following: !#$%&'*+-/=?^_{|}~`

At minimum, please allow the plus sign as it's used by users for tagging (e.g. if my email is example@gmail.com, I may use example+financial@gmail.com for financial purposes, e.g. when creating a login with my banks). Anyway, the plus signs are more common than folks think.

The solution is pretty simple - file to update is: <website root>/plugins/cck_field_validation/email/email.php and the line of code is: protected static $regex = '/^([A-Za-z0-9_+\-\.\'])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,10})$/'; which could change to protected static $regex = '/^([A-Za-z0-9_+\-\.\'])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,10})$/'; for the plus sign change.

Thank you so much!

sebastienheraud commented 1 year ago

Hi @MtnPavlas, Email regex updated to allow the "+" sign https://github.com/Octopoos/SEBLOD/commit/18aa2771567683ee048e282d4060eb61f1fce272 Saba