ng-payment-card
ng-payment-card copied to clipboard
Unable to validate on Submit
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.
same problem
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){}