Structures
The following structures are available globally.
-
A type representation of a credit card that identifies properties of various types and can perform formatting of their numbers.
See morelet creditCard = DSCreditCard(number: "4111111111111111") print(creditCard.formattedNumber)
Declaration
Swift
public struct DSCreditCard
-
A validation rule that allows for an error message to be expressly set. When the message is non-empty, the validation fails. Useful for showing backend errors.
See moreDeclaration
Swift
public struct DSAdHocValidationRule : DSValidationRule
-
A validation rule for requiring that a credit card number matches a legal format as much as possible.
See moreDeclaration
Swift
public struct DSCreditCardValidationRule : DSValidationRule
-
A validation rule for requiring a valid currency is entered.
See moreDeclaration
Swift
public struct DSCurrencyValidationRule : DSValidationRule
-
A validation rule for email addresses. Returns an error when a proper email address has not been formed. Does not verify that an email address exists, only that it’s legal.
See moreDeclaration
Swift
public struct DSEmailAddressValidationRule : DSValidationRule
-
A validation rule for capping the length of the text to a maximum amount.
See moreDeclaration
Swift
public struct DSMaxTextLengthValidationRule : DSValidationRule
-
A validation rule for requiring that text is a number and is between a min and max value. (Inclusive.)
See moreDeclaration
Swift
public struct DSMinMaxValidationRule : DSValidationRule
-
A validation rule for requiring that only digits are entered.
See moreDeclaration
Swift
public struct DSNumberValidationRule : DSValidationRule
-
A validation rule for requiring text to be a phone number of format XXX-XXX-XXXX.
See moreDeclaration
Swift
public struct DSPhoneNumberValidationRule : DSValidationRule
-
A validation rule for requiring that text exists and is not an empty string.
See moreDeclaration
Swift
public struct DSRequiredTextValidationRule : DSValidationRule