Skip to content
This repository has been archived by the owner on Mar 13, 2022. It is now read-only.

Unable to validate on Submit #497

Open
beelaal opened this issue Jun 21, 2020 · 2 comments
Open

Unable to validate on Submit #497

beelaal opened this issue Jun 21, 2020 · 2 comments

Comments

@beelaal
Copy link

beelaal commented Jun 21, 2020

On submit the validation of inputs are still sending the data, Please mention how to disable the submit button if there is any validation error.

@yasarutkuu
Copy link

same problem

@ggouaze
Copy link

ggouaze commented Jun 3, 2021

to solve this problem you can

  • create a viewchild reference on the ts file like "@ViewChild('paymentElement') paymentElement : PaymentCardComponent;"
  • on html file : <ng-payment-card
    #paymentElement
    (formSaved)="processPayment($event)">
  • on your function processPayment you can check like this :
    if(this.paymentElement.ccForm.valid){}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants