Skip to content

Email Validator #22106

@strikeflo

Description

@strikeflo
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version master

File : https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Constraints/EmailValidator.php

There's a problem when using checkMX option with email with a @ at the end leading to error "Warning: checkdnsrr(): Host cannot be empty"

The regex '/^.+@\S+.\S+$/' line 81 allow email pattern like 'name@email.com@' but the code substr($value, strrpos($value, '@') + 1) line 90 doesn't work then and return empty string for $host...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions