Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 04:20:24 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155543 Posts in 21714 Topics by 7736 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: 1 [2]   Go Down
Print
Author Topic: Probleme mit Hotmail-Addis  (Read 1365 times)
testör
Guest
« Reply #25 on: December 27, 2010, 05:29:12 PM »

framework/class.wb.php, Zeile 270

Code:
<?php
function validate_email($email) {
if(preg_match('/^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$/'$email)) {
return true;
} else {
return false;
}
}
?>

Ich bin kein Regex-Experte, aber sollte klar sein, dass man hier etwas ändern muss.
Logged
NorHei
Forum administrator
*****
Online Online

Posts: 485



WWW
« Reply #26 on: December 27, 2010, 05:34:40 PM »

Super , das reicht mir, Ich wußte nur nicht ob das im separat im Formular oder zentral gelöst wird und hatte keine Zeit zum suchen mit der Regex werd ich fertig .  
« Last Edit: December 27, 2010, 05:51:03 PM by NorHei » Logged

It is easier to change the specification to fit the program than vice versa.
NorHei
Forum administrator
*****
Online Online

Posts: 485



WWW
« Reply #27 on: December 27, 2010, 06:14:19 PM »

Also Mal auf die schnelle das löst auf jeden Fall das Problem:
Code:
if(preg_match('/^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z_+&-]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$/', $email)) {

Irgendwo hatte ich noch eine fast 100% RFC 2822 kompatible, die poste ich später.
Logged

It is easier to change the specification to fit the program than vice versa.
NorHei
Forum administrator
*****
Online Online

Posts: 485



WWW
« Reply #28 on: December 27, 2010, 06:24:50 PM »

http://www.regexlib.com/REDetails.aspx?regexp_id=2558
Logged

It is easier to change the specification to fit the program than vice versa.
Amellysmann

Offline Offline

Posts: 12


WWW
« Reply #29 on: December 27, 2010, 07:02:38 PM »

Also Mal auf die schnelle das löst auf jeden Fall das Problem:
Code:
if(preg_match('/^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z_+&-]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$/', $email)) {

Irgendwo hatte ich noch eine fast 100% RFC 2822 kompatible, die poste ich später.

Danke das hat als Lösung gereicht nun geht das auch mit solchen Mailadressen. Ein riesen Dank an alle die mitgeholfen haben.
Logged
NorHei
Forum administrator
*****
Online Online

Posts: 485



WWW
« Reply #30 on: December 27, 2010, 09:29:02 PM »

Hier noch mal die ganz komplexe, für PHP brauchte es noch einige kleine Anpassungen.

Code:
if(preg_match("/^((([!#$%&'*+\\-\/\=?^_`{|}~\w])|([!#$%&'*+\\-\/\=?^_`{|}~\w][!#$%&'*+\\-\/\=?^_`{|}~\.\w]{0,}[!#$%&'*+\\-\/\=?^_`{|}~\w]))[@]\w+([-.]\w+)*\.\w+([-.]\w+)*)$/", $email)) {
Logged

It is easier to change the specification to fit the program than vice versa.
dbs
WebsiteBaker Org e.V.

Offline Offline

Posts: 3719


WWW
« Reply #31 on: December 27, 2010, 09:44:57 PM »

wie ist das mit minus am anfang, mit drin in der lösung?
hatte vor jahren mal eine adresse wie diese: -nick-@web.de
hatte mit der dann probleme bzw. die kamen nie an.
Logged

NorHei
Forum administrator
*****
Online Online

Posts: 485



WWW
« Reply #32 on: December 27, 2010, 09:54:55 PM »

Grade getestet , geht wunderbar.

Die Lösung sollte wirklich fast 100% RFC konform sein.
Logged

It is easier to change the specification to fit the program than vice versa.
dbs
WebsiteBaker Org e.V.

Offline Offline

Posts: 3719


WWW
« Reply #33 on: December 27, 2010, 10:10:57 PM »

na denn sollte das wohl in die 2.8.2  wink
Logged

NorHei
Forum administrator
*****
Online Online

Posts: 485



WWW
« Reply #34 on: January 11, 2011, 05:36:25 PM »

Nachtrag
Code:
if(preg_match("/^((([!#$%&'*+\\-\/\=?^_`{|}~\w])|([!#$%&'*+\\-\/\=?^_`{|}~\w][!#$%&'*+\\-\/\=?^_`{|}~\.\w]{0,}[!#$%&'*+\\-\/\=?^_`{|}~\w]))[@]\w+(([-.]|\-\-)\w+)*\.\w+(([-.]|\-\-)\w+)*)$/", $email)) {

Jetzt schluckt der Test auch Umlautdomains wenn man sie vorher nach Punycode umwandelt.

Umwandlung am besten hiermit:
http://www.phpclasses.org/package/1509-PHP-Convert-from-and-to-IDNA-Punycode-domain-names.html


« Last Edit: January 11, 2011, 05:52:57 PM by NorHei » Logged

It is easier to change the specification to fit the program than vice versa.
Pages: 1 [2]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!