Skip to content

Conversation

@spolischook
Copy link
Contributor

Q A
Bug fix? [yes]
New feature? [no]
BC breaks? [no]
Deprecations? [no]
Tests pass? [no]
Fixed tickets []
License MIT
Doc PR []

I think "/example@example.co.uk" this is not valid email address. Does I need to fix it?

internal php FILTER_VALIDATE_EMAIL allows many chapters that can't be in email addresses
!#$%&'+-/=?^`{|}~@.[]
http://php.net/manual/ru/filter.filters.sanitize.php
So we need more strict validation like this regx:
^[_a-z0-9-]+(.[a-z0-9-]+)@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$

I think "/example@example.co.uk" this is not valid email address. Does I need to fix it?

internal php FILTER_VALIDATE_EMAIL allows many chapters that can't be in email addresses
!#$%&'*+-/=?^_`{|}~@.[]
http://php.net/manual/ru/filter.filters.sanitize.php
So we need more strict validation like this regx:
^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$
@jakzal
Copy link
Contributor

jakzal commented Feb 23, 2015

This is why we've got strict mode in the email validator introduced in #9140, see http://symfony.com/doc/current/reference/constraints/Email.html#strict.

@jakzal jakzal closed this Feb 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants