braintree / braintree_php

Braintree PHP library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
547 stars 224 forks source link

RFC5322 compliant email rejected as invalid #322

Closed ChrisHSandN closed 2 years ago

ChrisHSandN commented 2 years ago

General information

Issue description

I have come across a customer who (erroneously) entered an email address with a single letter TLD e.g. foo@bar.c

Attempting to call customer()->create() results in:

81604: Email is an invalid format.

While I appreciate there are currently no single letter TLDs issued, this email address is RFC5322 compliant and, as such, I would not expect it to be rejected as it is not technically in an “invalid format”.

I was wondering if you are able to either:

  1. Publish the custom rules which are applied to validate email addresses in addition to basic RFC5322 validation. Ideally this would be a method added to the SDKs – hence why I am posting this here.
  2. Remove the extra rules and just RFC5322 validate email address. Once we call the BT API, we are trying to charge the customer, not asking for advanced email validation to be performed on their provided email address!
crookedneighbor commented 2 years ago

Please reach out to our support team and raise this issue so we can better track it: https://developer.paypal.com/braintree/help