Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps to Reproduce:
1. Create a content type having email as one of the field.
2. Enter a invalid email such as "example@example".
It will validate it but it is not a valid email address.
Comment | File | Size | Author |
---|---|---|---|
#11 | drupal-8.0.x-dev-fixed-Email-field-validation-2661278-7.patch | 986 bytes | zeeshan_khan |
Comments
Comment #2
zeeshan_khan CreditAttribution: zeeshan_khan as a volunteer commentedComment #3
zeeshan_khan CreditAttribution: zeeshan_khan as a volunteer commentedFixed Email validation.
Best,
Zeeshan
Comment #5
zeeshan_khan CreditAttribution: zeeshan_khan as a volunteer commentedNot sure why simple test is failing?
Comment #6
dawehner@Zeeshan_khan
Note: this is a third party library so you would have to fix stuff on that, see https://github.com/egulias/EmailValidator
Comment #7
zeeshan_khan CreditAttribution: zeeshan_khan as a volunteer commentedThanks @dawehner,
I have fixed the server side validation in https://github.com/egulias/EmailValidator
Please check the attached patch.
Best,
Zeeshan
Comment #9
zeeshan_khan CreditAttribution: zeeshan_khan as a volunteer commentedComment #10
swentel CreditAttribution: swentel commentedWe don't make changes in vendor libraries, either add a bug report upstream or we need to find a different way for this.
Comment #11
zeeshan_khan CreditAttribution: zeeshan_khan as a volunteer commentedComment #12
dawehner@zeeshan_khan Please read the feedback which people provide you ...
Comment #13
zeeshan_khan CreditAttribution: zeeshan_khan as a volunteer commented@dawehner - Now the patch is passing as there was an issue in patch naming convention, also considered previous feedbacks and I am working on it.
Thanks
Comment #14
cilefen CreditAttribution: cilefen commented@zeeshan_khan Are you certain that example@example is invalid? Please do not post patches to vendor libraries in this queue. They will not be committed to Drupal. Open an issue at https://github.com/egulias/EmailValidator and reference the github issue here.
Comment #15
zeeshan_khan CreditAttribution: zeeshan_khan as a volunteer commented@cilefen - issue has already been created here: https://github.com/egulias/EmailValidator/issues/87
Comment #16
zeeshan_khan CreditAttribution: zeeshan_khan as a volunteer commentedComment #17
dawehnerComment #18
egulias CreditAttribution: egulias commentedHi,
"example@example" is a valid email address, please see RFC5321.
This is one of the main issues you'll find with PHP's built in filter_var when used for emails.
I'd like to point out that I'm working on V2, which will allow to add a custom filter (a "strategy") if you don't want to allow certain type of emails.
Comment #19
cilefen CreditAttribution: cilefen commented@egulias Thank you for the update.