mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 14:57:26 +08:00
Merge pull request #2424 from woocommerce/PCP-3156-fastlane-strip-empty-spaces-from-email-to-trigger-profile-lookup
AXO: Add whitespace stripping on submission (3156)
This commit is contained in:
commit
0e401e25af
1 changed files with 6 additions and 0 deletions
|
@ -709,6 +709,8 @@ class AxoManager {
|
|||
}`
|
||||
);
|
||||
|
||||
this.emailInput.value = this.stripSpaces( this.emailInput.value );
|
||||
|
||||
this.$( this.el.paymentContainer.selector + '-detail' ).html( '' );
|
||||
this.$( this.el.paymentContainer.selector + '-form' ).html( '' );
|
||||
|
||||
|
@ -1134,6 +1136,10 @@ class AxoManager {
|
|||
return emailPattern.test( value );
|
||||
}
|
||||
|
||||
stripSpaces( str ) {
|
||||
return str.replace( /\s+/g, '' );
|
||||
}
|
||||
|
||||
validateEmail( billingEmail ) {
|
||||
const billingEmailSelector = document.querySelector( billingEmail );
|
||||
const value = document.querySelector( billingEmail + ' input' ).value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue