public class DSCreditCardInputMask: DSInputMask
An input mask, when assigned to a DSTextField, will enforce use of a number pad for text entry and format credit card numbers if it recognizes the brand of the card being entered. (e.g. Visa, Mastercard, etc.)
It will also limit the number of characters based on the same rules.
let textField = DSTextField() textField.inputMask = DSCreditCardInputMask()
A masking object that controls what can be legally typed into a DSTextField and handles type formatting while that typing takes place. They do not validate but often "partner" up with validation rules.
public var keyboardType: UIKeyboardType?
Only numbers are needed to enter a credit card number.
public func rawText(from text: String) -> String
Raw numeric text with no spaces, dashes or other separators
public func shouldAllow(replacementString string: String, resultingString: String) -> Bool
Only allows numeric digits. All separators are added automatically.
public func applyFormattingMask(to text: String) -> String