Space ignored in eMail-Validation [message #21931] |
Tue, 04 January 2005 01:40 |
Xonk
Messages: 67 Registered: March 2004
Karma: 0
|
Member |
|
|
I just tried the latest version.
The validation of the email-adress when a new user fills the registration-formular allows spaces.
Greets,
Sven
|
|
|
Re: Space ignored in eMail-Validation [message #21941 is a reply to message #21931] |
Tue, 04 January 2005 19:50 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
I just tried it and "a @ a.com" was shown as invalid. I've also checked the regex responsible for this and it does not permit spaces anywhere.
FUDforum Core Developer
|
|
|
|
Re: Space ignored in eMail-Validation [message #22019 is a reply to message #22010] |
Sun, 09 January 2005 17:00 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Aha I see, thanks.
Here is the fix:
--- iemail.inc.t 2005-01-09 10:58:19.000000000 -0600
+++ iemail.inc.t~ 2005-01-09 10:58:19.000000000 -0600
@@ -12,7 +12,7 @@
function validate_email($email)
{
- return !preg_match('!^([-_A-Za-z0-9\.]+)\@([-_A-Za-z0-9\.]+)\.([A-Za-z0-9]{2,4})$!', $email);
+ return !preg_match('!([-_A-Za-z0-9\.]+)\@([-_A-Za-z0-9\.]+)\.([A-Za-z0-9]{2,4})$!', $email);
}
function encode_subject($text)
FUDforum Core Developer
|
|
|