ng-payment-card icon indicating copy to clipboard operation
ng-payment-card copied to clipboard

Unable to validate on Submit

Open beelaal opened this issue 4 years ago • 2 comments

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.

beelaal avatar Jun 21 '20 14:06 beelaal

same problem

yasarutkuu avatar Dec 17 '20 15:12 yasarutkuu

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){}

ggouaze avatar Jun 03 '21 07:06 ggouaze