Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Validator] Skip validation when email is an empty object #36672

Merged
merged 1 commit into from May 4, 2020

Conversation

acrobat
Copy link
Contributor

@acrobat acrobat commented May 3, 2020

Q A
Branch? 3.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

When the value passed to the email validator is an empty object the validator is still called and will mark the value as invalid. The object should be skipped in this case, as it is also done in the UrlValidator

$value = (string) $value;
if ('' === $value) {
return;
}

@acrobat acrobat force-pushed the fix-empty-object-email-validator branch from 6136c94 to de5d68e Compare May 3, 2020 19:36
@nicolas-grekas nicolas-grekas added this to the 3.4 milestone May 3, 2020
@fabpot
Copy link
Member

fabpot commented May 4, 2020

Thank you @acrobat.

@fabpot fabpot merged commit 469d82d into symfony:3.4 May 4, 2020
@acrobat acrobat deleted the fix-empty-object-email-validator branch May 4, 2020 09:25
This was referenced May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants