Joomla users with email domains longer than 4 letters
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
-
- Joomla! Apprentice
- Posts: 6
- Joined: Tue Oct 21, 2014 6:12 pm
Joomla users with email domains longer than 4 letters
We have joomla users who have a .travel domain for their email, and when I go to the user manager--> add new user, it considers the email invalid. It seems that it will allow only up to a 4 characters domain. Does anyone know which file contains the code where I can change this?
Thanks
Thanks
- pe7er
- Joomla! Master
- Posts: 24986
- Joined: Thu Aug 18, 2005 8:55 pm
- Location: Nijmegen, Netherlands
- Contact:
Re: Joomla users with email domains longer than 4 letters
I tried to reproduce this behavior in Joomla 3.3.6,
and there you can use email addresses like [email protected] without errors.
Which version do you use? The latest Joomla 2.5.27?
and there you can use email addresses like [email protected] without errors.
Which version do you use? The latest Joomla 2.5.27?
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
-
- Joomla! Apprentice
- Posts: 6
- Joined: Tue Oct 21, 2014 6:12 pm
- pe7er
- Joomla! Master
- Posts: 24986
- Joined: Thu Aug 18, 2005 8:55 pm
- Location: Nijmegen, Netherlands
- Contact:
Re: Joomla users with email domains longer than 4 letters
In Joomla 2.5 the email validation is defined indreamdest wrote:Does anyone know which file contains the code where I can change this?
/libraries/joomla/form/rules/email.php
Code: Select all
class JFormRuleEmail extends JFormRule
{
/**
* The regular expression to use in testing a form field value.
*
* @var string
* @since 11.1
*/
protected $regex = '^[\w.-]+(\+[\w.-]+)*@\w+[\w.-]*?\.\w{2,4}$';
In Joomla 3.3.6 the email validation looks different
/libraries/joomla/form/rule/email.php
Code: Select all
class JFormRuleEmail extends JFormRule
{
/**
* The regular expression to use in testing a form field value.
*
* @var string
* @since 11.1
* @see http://www.w3.org/TR/html-markup/input.email.html
*/
protected $regex = '^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$';
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
-
- Joomla! Apprentice
- Posts: 6
- Joined: Tue Oct 21, 2014 6:12 pm
Re: Joomla users with email domains longer than 4 letters
I changed it to {2,6} and it still doesn't work
- pe7er
- Joomla! Master
- Posts: 24986
- Joined: Thu Aug 18, 2005 8:55 pm
- Location: Nijmegen, Netherlands
- Contact:
Re: Joomla users with email domains longer than 4 letters
I've created a bug report about it in Joomla's issue tracker:
http://issues.joomla.org/tracker/joomla-cms/4891
http://issues.joomla.org/tracker/joomla-cms/4891
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
- dhuelsmann
- Joomla! Master
- Posts: 19659
- Joined: Sun Oct 02, 2005 12:50 am
- Location: Omaha, NE
- Contact:
Re: Joomla users with email domains longer than 4 letters
There are several places to change this code to ensure it works for your issue:
It is a javascript validation in /public_html/media/system/js/validate-uncompressed.js
Change the {2,4} to {2,8} to accommodate your email TLD. You will also have to find that in the compressed version validate.js (a little more difficult) and change it.
Do the same in /public_html/libraries/joomla/form/rules/email.php
The above info came from this tracker item http://joomlacode.org/gf/project/joomla ... m_id=28128
Unfortunately, the change in the regex they made did not fix it.
It is a javascript validation in /public_html/media/system/js/validate-uncompressed.js
Code: Select all
this.setHandler('email',
function (value) {
regex=/^[a-zA-Z0-9._-]+(\+[a-zA-Z0-9._-]+)*@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
return regex.test(value);
Do the same in /public_html/libraries/joomla/form/rules/email.php
Code: Select all
protected $regex = '^[\w.-]+(\+[\w.-]+)*@\w+[\w.-]*?\.\w{2,4}$';
Unfortunately, the change in the regex they made did not fix it.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org