title: form submit not working on mobile device (match the requested format)
body: <p>I have a small angular app I have made that works fine on my computer, but does not work properly on any mobile device. The problem is the form submit button. The button will not submit form and hitting the return key on my ipad on the last form field directs back to the card number form field and says "Match the requested format" ... I am using Stripe by the way. </p>
  
  <p>I have tried ngSubmit on the form and changed the button around to input type and type button and etc. I have also got rid of ngSubmit and used (click)="buy()" which also works on a desktop, but not on a mobile device. I have even added (tap) from hammerjs just in case it was a touch issue. I tried using a label outside of the form linked to the submit button. None of which work. I added an alert to just see if the button was even being clicked, and it is, the mobile device will show the alert, but wont submit the form. So, please ignore the the code at the bottom where I have multiple buttons a labels, it was for testing purposes (it all works on desktop though as is, just not on any mobile device). </p>
  
  <p>Here are two pics of the problem:</p>
  
  <p><a href="https://drive.google.com/file/d/18grWfXyQN9gvcuJRuUqIoS_yjMsU1vii/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/18grWfXyQN9gvcuJRuUqIoS_yjMsU1vii/view?usp=sharing</a>)
  <a href="https://drive.google.com/file/d/1ezhyAtTg1Z1OomLd9pv47Bif-0ILOR5b/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/1ezhyAtTg1Z1OomLd9pv47Bif-0ILOR5b/view?usp=sharing</a></p>
  
  <pre><code>&lt;app-navbar&gt;&lt;/app-navbar&gt;
  
  &lt;div class="container"&gt;
      &lt;form class="example-form" action="#" [formGroup]="stripeTest"&gt;
          &lt;table class="example-full-width" cellspacing="0"&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;mat-form-field class="example-full-width media-width"&gt;
                          &lt;input matInput type="text" placeholder="Full Name"
                                 formControlName="name" id="firstName"&gt;
                          &lt;mat-error *ngIf="hasError('name', 'required')"&gt;First Name is
                              required
                          &lt;/mat-error&gt;
                      &lt;/mat-form-field&gt;
                  &lt;/td&gt;
  
  
          &lt;/table&gt;
          &lt;table class="example-full-width" cellspacing="0"&gt;
              &lt;td&gt;
                  &lt;mat-form-field class="example-full-width"&gt;
                      &lt;input matInput type="text" placeholder="Phone "
                             formControlName="phone" id="phone"&gt;
                      &lt;mat-error *ngIf="hasError('phone', 'required')"&gt;Zip is
                          required
                      &lt;/mat-error&gt;
                  &lt;/mat-form-field&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;mat-form-field class="example-full-width"&gt;
                      &lt;input matInput type="text" placeholder="Email"
                             formControlName="email" id="email"&gt;
                      &lt;mat-error *ngIf="hasError('email', 'required')"&gt;Zip is
                          required
                      &lt;/mat-error&gt;
                  &lt;/mat-form-field&gt;
              &lt;/td&gt;
          &lt;/table&gt;
  
          &lt;p&gt;
              &lt;mat-form-field class="example-full-width addr-media-width"&gt;
            &lt;textarea matInput type="text" placeholder="Address"
                      formControlName="address_line1" id="address"&gt;&lt;/textarea&gt;
                  &lt;mat-error *ngIf="hasError('address_line1', 'required')"&gt;Address
                      is required
                  &lt;/mat-error&gt;
              &lt;/mat-form-field&gt;
          &lt;/p&gt;
  
          &lt;table class="example-full-width" cellspacing="0"&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;mat-form-field class="example-full-width"&gt;
                          &lt;input matInput type="text" placeholder="City"
                                 formControlName="address_city" id="city"&gt;
                          &lt;mat-error *ngIf="hasError('address_city', 'required')"&gt;City is
                              required
                          &lt;/mat-error&gt;
                      &lt;/mat-form-field&gt;
                  &lt;/td&gt;
  
                  &lt;td&gt;
                      &lt;mat-form-field class="example-full-width state-width"&gt;
                          &lt;input matInput type="text" placeholder="State"
                                 formControlName="address_state" id="state"&gt;
                          &lt;mat-error *ngIf="hasError('address_state', 'required')"&gt;State is
                              required
                          &lt;/mat-error&gt;
                      &lt;/mat-form-field&gt;
                  &lt;/td&gt;
  
                  &lt;td&gt;
                      &lt;mat-form-field class="half-width"&gt;
                          &lt;input matInput type="text" placeholder="Zip"
                                 formControlName="address_zip" id="zip"&gt;
                          &lt;mat-error *ngIf="hasError('address_zip', 'required')"&gt;Zip is
                              required
                          &lt;/mat-error&gt;
                      &lt;/mat-form-field&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
  
  
          &lt;div class="col-lg-12"&gt;
              &lt;div id="card-element" class="field"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col-lg-12"&gt;
  
              &lt;input type="submit" id="submit-form" [disabled]="!stripeTest.valid"
                     class="btn btn-danger" style="visibility: hidden" (click)="buy()"&gt;
              &lt;button type="button" (tap)="buy()"&gt;Buy&lt;/button&gt;
              &lt;button class="btn btn-danger" (click)="cancel()"&gt;Cancel&lt;/button&gt;
  
          &lt;/div&gt;
      &lt;/form&gt;
  
      &lt;label for="submit-form" tabindex="0"&gt;Submit&lt;/label&gt;
  </code></pre>
  
  <p>buy function </p>
  
  <pre><code>buy(){
      const name = this.stripeTest.get('name').value;
      const phone = this.stripeTest.get('phone').value;
      const email = this.stripeTest.get('email').value;
      const address_state = this.stripeTest.get('address_state').value;
      const address_city = this.stripeTest.get('address_city').value;
      const address_line1 = this.stripeTest.get('address_line1').value;
      const address_zip = this.stripeTest.get('address_zip').value;
  
      let newCustomer: Customer = {
          name: name,
          phone: phone,
          email: email
      };
  
      this.dataService.addCustomer(newCustomer)
          .subscribe(() =&gt; {
              console.log('Added');
          })
  
      this.stripeService
          .createToken(this.card, {
              name, address_state, address_city, address_line1,
              address_zip
          })
          .subscribe(obj =&gt; {
              if (obj) {
                  console.log('Token is --&gt; ', obj.token.id);
  
                  // tslint:disable-next-line: no-unused-expression
                  this.http.post('http://localhost:3000/payme', {
                      token: obj.token.id,
                      receipt_email: email
                  }).subscribe(
                      (res) =&gt; {
                          console.log('The response from server is ', res);
                          console.log('Payment Done');
                          this.router.navigateByUrl('/thank-you');
                          alert(obj.token.id + obj + Customer + name + res);
                      },
                      (err) =&gt; {
                          console.log('The error is ', err);
                          alert(err);
                      })
  
              } else {
                  // Error creating the token
                  console.log('Error comes ');
              }
          });
  }
  </code></pre>