Skip to content
View in the app

A better way to browse. Learn more.

thirty bees forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Email address validation missing - domaincom accepted (dot missing)

Featured Replies

Hi,

A customer was able to sign up with a gmailcom address (dot missing).

I think the shop software should validate the address and require a dot in the part after the @.

Is there a way we could implement this?

about validation, I don't know if is already possible but think about the possibility to allow of emails like: [email protected] https://www.cs.rutgers.edu/~watrous/plus-signs-in-email-addresses.html

Hi,

You can implement this with an override. Just create a file named Validate.php in directories override\classes So you get your file at override\classes\Validate.php

In Validate.php, just write:

``` <?php

class Validate extends ValidateCore { public static function isEmail($email) { if (empty($email) || !pregmatch(Tools::cleanNonUnicodeSupport('/^[a-z\p{L}0-9!#$%&\'*+\/=?^{}|~_-]+[.a-z\p{L}0-9!#$%&\'*+\/=?^{}|~-]@[a-z\p{L}0-9]+(?:[.]?[_a-z\p{L}0-9-]).[a-z\p{L}0-9]+$/ui'), $email)) return false;

    try {
        \Swift_Message::newInstance()->setFrom($email);

        return true;
    } catch (\Exception $e) {
        return false;
    }
}

}

```

Clean the cache (especially class_index.php), and it's works.

Regards.

  • Author

Thanks, @Lathaneo!

@mdekker But is there a strong use case for email addresses without a TLD for an online shop? I would assume the only place where that would be required is with a type of localhost domain, but not for any true customer email address.

  • 2 months later...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.