Welcome Guest, Not a member yet? Register   Sign In
space in quoted string in email is treated as not valid
#1

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
Reply
#2

Usally email dont have a double quotation
Enlightenment  Is  Freedom
Reply
#3

Thats an illegal email address.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

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)
Reply
#5

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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB