Please let me know which mailing list address to use if I have sent this to
the wrong list.
filter_var does not properly validate emails with international characters.
For example, this returns FALSE:
var_dump(filter_var("Pelé@example.com", FILTER_VALIDATE_EMAIL));
Are there any plans to implement proper validation of email addresses as
described in RFC 6530?
http://tools.ietf.org/html/rfc6530
j adams wrote on 06/02/2015 00:05:
Please let me know which mailing list address to use if I have sent this to
the wrong list.filter_var does not properly validate emails with international characters.
For example, this returns FALSE:var_dump(filter_var("Pelé@example.com", FILTER_VALIDATE_EMAIL));
Are there any plans to implement proper validation of email addresses as
described in RFC 6530?
http://tools.ietf.org/html/rfc6530
Hi,
There was a discussion a while back about Internationalized Domain Name
support in FILTER_VALIDATE_URL
[1], and I believe there was a concern
that since not all systems would accept the wider format, allowing them
through the existing filter might be unhelpful. This is particularly
true in the case of internationalized e-mails, since if I understand it
correctly it's an "all or nothing" system, rather than one with a
compatible fallback like the "punycode" notation used in domains.
The most useful would probably be to add a new filter type which
accepted the new format, so that users could choose to accept what they
know they can process. If you know of or can create a succinct validity
test (e.g. a PCRE-compatible regex) it ought to be fairly easy to add;
the existing implementation is here for comparison:
http://lxr.php.net/xref/PHP_TRUNK/ext/filter/logical_filters.c#575
Regards,
Rowan Collins
[IMSoP]
Rowan, thanks for your response.
Wow that regex is pretty intense. A new filter type sounds like a
reasonable idea to me. I'm not sure if I'll be able to offer any
improvements myself (although I will look into it shortly here). I I do
know that Google announced last August that they plan to support RFC6530:
http://googleblog.blogspot.com/2014/08/a-first-step-toward-more-global-email.html
On Fri, Feb 6, 2015 at 7:14 AM, Rowan Collins rowan.collins@gmail.com
wrote:
j adams wrote on 06/02/2015 00:05:
Please let me know which mailing list address to use if I have sent this
to
the wrong list.filter_var does not properly validate emails with international
characters.
For example, this returns FALSE:var_dump(filter_var("Pelé@example.com", FILTER_VALIDATE_EMAIL));
Are there any plans to implement proper validation of email addresses as
described in RFC 6530?
http://tools.ietf.org/html/rfc6530Hi,
There was a discussion a while back about Internationalized Domain Name
support inFILTER_VALIDATE_URL
[1], and I believe there was a concern that
since not all systems would accept the wider format, allowing them through
the existing filter might be unhelpful. This is particularly true in the
case of internationalized e-mails, since if I understand it correctly it's
an "all or nothing" system, rather than one with a compatible fallback like
the "punycode" notation used in domains.The most useful would probably be to add a new filter type which accepted
the new format, so that users could choose to accept what they know they
can process. If you know of or can create a succinct validity test (e.g. a
PCRE-compatible regex) it ought to be fairly easy to add; the existing
implementation is here for comparison: http://lxr.php.net/xref/PHP_
TRUNK/ext/filter/logical_filters.c#575[1] http://grokbase.com/t/php/php-internals/149jfzxtq3/
internationalized-domain-name-support-in-filter-validate-urlRegards,
Rowan Collins
[IMSoP]