Swift class providing card number, expiration, and CVC validation for Stripe payments.
// Source: https://github.com/stripe/stripe-ios | License: MIT | Copyright 2011- Stripe, Inc. (https://stripe.com)
// Provided via justclaw.it.com; keep this notice with the code.
//
// STPCardValidator.swift
// StripePayments
//
// Created by Jack Flintermann on 7/15/15.
// Copyright (c) 2015 Stripe, Inc. All rights reserved.
//
import Foundation
@_spi(STP) import StripeCore
/// These fields indicate whether a card field represents a valid value, invalid
/// value, or incomplete value.
@objc @frozen public enum STPCardValidationState: Int {
/// The field's contents are valid. For example, a valid, 16-digit card number.
/// Note that valid values may not be complete. For example: a US Zip code can
/// be 5 or 9 digits. A 5-digit code is Valid, but more text could be enter
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key