Home > Net >  Get info for Invalid Stripe textfield inputs
Get info for Invalid Stripe textfield inputs

Time:04-13

I am using Stripe SDK for ios to make payments. I am using STPPaymentCardTextField to get card details input from the user.

I can check if details are invalid by using 'isValid' property but my concern is how can i get which input is invalid? like how can I get if the user has entered the wrong card number or expiration date is wrong and more?

CodePudding user response:

The isValid property checks that all of the STPPaymentCardTextField fields are valid. To validate each input individually, you could use STPCardValidator.

Note that the STPPaymentCardTextField will automatically highlight any incorrect values in the inputs.

  • Related