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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sanket_markan created an issue. See original summary.

zeeshan_khan’s picture

Assigned: Unassigned » zeeshan_khan
zeeshan_khan’s picture

Fixed Email validation.

Best,
Zeeshan

Status: Needs review » Needs work

The last submitted patch, 3: 8.0.x-dev-fixed-Email-field-validation-2661278-#1.patch, failed testing.

zeeshan_khan’s picture

Status: Needs work » Needs review

Not sure why simple test is failing?

dawehner’s picture

@Zeeshan_khan
Note: this is a third party library so you would have to fix stuff on that, see https://github.com/egulias/EmailValidator

zeeshan_khan’s picture

Thanks @dawehner,

I have fixed the server side validation in https://github.com/egulias/EmailValidator
Please check the attached patch.

Best,
Zeeshan

Status: Needs review » Needs work
zeeshan_khan’s picture

Status: Needs work » Needs review
swentel’s picture

Status: Needs review » Needs work

We don't make changes in vendor libraries, either add a bug report upstream or we need to find a different way for this.

zeeshan_khan’s picture

dawehner’s picture

Status: Needs review » Needs work

@zeeshan_khan Please read the feedback which people provide you ...

zeeshan_khan’s picture

Assigned: Unassigned » zeeshan_khan

@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

cilefen’s picture

@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.

zeeshan_khan’s picture

@cilefen - issue has already been created here: https://github.com/egulias/EmailValidator/issues/87

zeeshan_khan’s picture

Status: Needs work » Needs review
dawehner’s picture

Status: Needs review » Postponed
egulias’s picture

Hi,
"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.

cilefen’s picture

Status: Postponed » Closed (works as designed)

@egulias Thank you for the update.