paypal / paypal-js

Loading wrapper and TypeScript types for the PayPal JS SDK
Apache License 2.0
227 stars 75 forks source link

[Bug] Mobile phone validation is incorrectly displaying as invalid when the phone number is valid #464

Open pbojanczyk opened 6 months ago

pbojanczyk commented 6 months ago

Library used

paypal-js

šŸž Describe the Bug

The form validation incorrectly triggers validation errors when the form is in a valid state. The only was to get around it is to erease one character and re-type it.

šŸ”¬ Minimal Reproduction

Reproduction is very easy. You can even observe the issue on the Official PayPal demo site: https://developer.paypal.com/demo/checkout/#/pattern/validation

  1. I was using US as my country but I was also able to replicate this by setting Canada as my country
  2. Enter 416 555 5555 into the Mobile text box
  3. Everything should be fine so far but try adding one more digit into the phone.
  4. Paypal textbox entry rejects the digit and it will still display 416 555 5555 however the textbox is now in errornous state

šŸ˜• Actual Behavior

Paypal textbox entry rejects the digit and it will still display 416 555 5555 however the textbox is now in errornous state

šŸ¤” Expected Behavior

Paypal textbox entry should reject the digit and the phone number field should remain in a valid state

šŸŒ Environment

āž• Additional Context

Add any other context about the problem here.

wsbrunson commented 4 months ago

hi @pbojanczyk, thank you for your report.

The team that works on this component is aware of the issue. They will link their internal jira ticket to this issue and update it when they deploy a fix.

pbojanczyk commented 2 months ago

Any update on this? I can still reproduce it on the demo site

wsbrunson commented 2 months ago

unfortunately there are no updates currently, the team that works on this component hasn't had capacity to get to this issue yet