flanker
flanker copied to clipboard
validate_address can't handle display name
This looks like a possible bug; address.validate_address returns none when passed a email string with a display name. Yet parse can handle it.
>>> text = 'Fooman <[email protected]>'
>>> address.validate_address(text)
>>> None
>>> address.validate_address('[email protected]')
>>> [email protected]
>>> address.parse('Fooman <[email protected]>')
>>>Fooman <[email protected]>
I was not the one who originally wrote this, but the docstring states that the method takes addr_spec
which i suppose means just email address, no display name. I personally see no problem in making it work on addresses that include display name. So I am tagging that as enhancement. But it is so minor, that I doubt it will ever be implemented unless you wanna venture a PR :)