Prestashop: FO - Checkout / Email validation not verify mail extensions ( .fr or .com)

Created on 26 Nov 2020  ·  6Comments  ·  Source: PrestaShop/PrestaShop

Describe the bug

In the checkout process , the email address is not correctly verified
If @ is missing the error message is correctly displayed and we can't continue the checkout process
But the extension ( .fr or .com) is not verified and we can continue the checkout process without any mail extensions

Expected behavior

The email address should be correctly verified

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to FO
  2. Add products to cart
  3. Start the checkout process => continue as guest or create customer
  4. In the email field try to just add => demo@prestashop
  5. Click on continue
  6. See error => the checkout process go to the next steps => it should not

Screenshots

If applicable, add screenshots or screen recordings to help explain your problem.

Additional information

  • PrestaShop version: 1.7.7.x && develop
  • PHP version: 7.1
1.7.7.0 1.7.7.x Bug Checkout Email FO Major No change required Regression develop

Most helpful comment

@PululuK it will be the case in 1.7.7.0 https://github.com/PrestaShop/PrestaShop/blob/1.7.7.x/classes/Validate.php#L62

So incredible you are @atomiix ✌🏾

All 6 comments

ping @hibatallahAouadni I think this issue can be added in an epic with this two one :

20351

11588

As discussed in Slack, I believe 1.7.6.9 behavior is faulty while 1.7.7.0 behavior is correct

According to https://en.wikipedia.org/wiki/Email_address the email address demo@prestashop is valid. It should not be rejected by PrestaShop.

As discussed in Slack, I believe 1.7.6.9 behavior is faulty while 1.7.7.0 behavior is correct

According to https://en.wikipedia.org/wiki/Email_address the email address demo@prestashop is valid. It should not be rejected by PrestaShop.

@matks I think Prestashop mail validation rules must be compatible with swiftmailer RFC validations to avoid :

PHP Fatal error:  Uncaught exception 'Swift_RfcComplianceException' with message 'Address in mailbox given [[email protected]] does not comply with RFC 2822,

Ex.: [email protected]
| | validators | status | note |
|:----------:|-------------|:------:| ------|
| Pretashop | Validate::isEmail() | :heavy_check_mark: | Customers can register and log in
| Swiftmailer | https://github.com/egulias/EmailValidator#getting-started | ❌ | Customers cannot receive any prestashop mail

@PululuK it will be the case in 1.7.7.0 https://github.com/PrestaShop/PrestaShop/blob/1.7.7.x/classes/Validate.php#L62

So incredible you are @atomiix ✌🏾

As specified above this is the wanted behavior, so I close this issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wikao2 picture wikao2  ·  3Comments

centoasa picture centoasa  ·  3Comments

marionf picture marionf  ·  3Comments

PrestaShark picture PrestaShark  ·  3Comments

zuk3975 picture zuk3975  ·  3Comments