CodeIgniter Forums
space in quoted string in email is treated as not valid - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: space in quoted string in email is treated as not valid (/showthread.php?tid=79689)



space in quoted string in email is treated as not valid - lukmim - 07-20-2021

this is just a tiny nitpick: emails containing spaces in quoted strings are treated by CI4 as not valid (using the "valid_email" validation)
Code:
"Fred Bloggs"@example.com
see https://datatracker.ietf.org/doc/html/rfc3696#section-3


RE: space in quoted string in email is treated as not valid - paliz - 07-20-2021

Usally email dont have a double quotation


RE: space in quoted string in email is treated as not valid - InsiteFX - 07-21-2021

Thats an illegal email address.


RE: space in quoted string in email is treated as not valid - lukmim - 07-23-2021

why? it's a direct example from the RFC.

Also:
Quote:If quoted, it may contain Space
Quote:space and special characters "(),:;<>@[\] are allowed with restrictions (they are only allowed inside a quoted string
Quote:Examples
Valid email addresses
" "@example.org (space between the quotes)



RE: space in quoted string in email is treated as not valid - paulbalandan - 07-23-2021

The valid_email rule uses PHP's native filter_var with FILTER_VALIDATE_EMAIL flag. If the quoted email fails here, then PHP itself does not support the RFC fully.

You can submit a PR to accomodate these edge cases.