Structures
The following structures are available globally.
-
The
See moreAlphabeticConditionchecks a string for occurrences of letters.Declaration
Swift
public struct AlphabeticCondition : ConfigurableCondition
-
The
See moreAlphanumericConditionchecks a string for occurrences of letters and/or numbers.Declaration
Swift
public struct AlphanumericCondition : ConfigurableCondition
-
The
See moreCreditCardConditionchecks a string for a credit card number.Declaration
Swift
public struct CreditCardCondition : ConfigurableCondition
-
The
See moreNumericConditionchecks a string for numbers.Declaration
Swift
public struct NumericCondition : ConfigurableCondition
-
The
PasswordStrengthConditionchecks for the strength of a password string. The strength is measured on five simple criteria: - contains lower case characters - contains upper case characters - contains numeric characters - contains special characters (e.g /‘;~) - is more than 8 characters longEach of these matched criteria moves the password strength of the string up one strength, strength is measured on
PasswordStrength.If the password strength matches or is above the required strength than the condition will pass.
See moreDeclaration
Swift
public struct PasswordStrengthCondition : ConfigurableCondition
-
The
See morePostcodeConditionchecks a string for a post code.Declaration
Swift
public struct PostcodeCondition : ConfigurableCondition
-
The
See moreRangeConditionvalidates the length of a string.Declaration
Swift
public struct RangeCondition : ConfigurableCondition
-
The
URLConditionchecks a string for a valid URL.See moreNote
The scheme (protocol) is needed for a valid URL. If you want a check for shorthand URLs seeURLShorthandCondition. Only HTTP and HTTPS schemes are considered valid.Declaration
Swift
public struct URLCondition : Condition
-
The
URLShorthandConditionchecks a string for a valid URL.See moreNote
No scheme (protocol) is needed for a valid URL. If you want a check for more strict URLs seeURLCondition.Declaration
Swift
public struct URLShorthandCondition : Condition
-
Stores configuration for
See moreAlphabeticCondition.Declaration
Swift
public struct AlphabeticConfiguration : Configuration
-
Stores configuration for
See moreAlphanumericCondition.Declaration
Swift
public struct AlphanumericConfiguration : Configuration
-
Credit card types that are supported by
See moreCreditCardCondition. There is aregexproperty that returns the regex for validating that credit card number.Declaration
Swift
public struct CreditCardType : OptionSet, CustomStringConvertible -
Stores configuration for
See moreCreditCardCondition.Declaration
Swift
public struct CreditCardConfiguration : Configuration
-
Stores configuration for
See moreNumericCondition.Declaration
Swift
public struct NumericConfiguration : Configuration
-
Stores configuration for
See morePasswordStrengthCondition.Declaration
Swift
public struct PasswordStrengthConfiguration : Configuration
-
Stores configuration for
See morePostcodeCondition.Declaration
Swift
public struct PostcodeConfiguration : Configuration
-
Stores configuration for
See moreRangeCondition.Declaration
Swift
public struct RangeConfiguration : Configuration
-
Convenience implementation of
See moreFormthat is a form full of any type ofValidatorControl.Declaration
Swift
public struct ControlForm : Form
-
The
AlphabeticValidatorcontains anAlphabeticCondition. A valid string only contains letters.See moreSeealso
AlphabeticConditionDeclaration
Swift
public struct AlphabeticValidator : ConfigurableValidator
-
The
AlphanumericValidatorcontains anAlphanumericCondition. A valid string only contains letters and/or numbers.See moreSeealso
AlphanumericConditionDeclaration
Swift
public struct AlphanumericValidator : ConfigurableValidator
-
The
CreditCardValidatorcontains anCreditCardCondition. A valid string is a credit card number.See moreSeealso
CreditCardConditionDeclaration
Swift
public struct CreditCardValidator : ConfigurableValidator
-
The
EmailValidatorcontains anEmailCondition. A valid string is an email address.See moreSeealso
EmailConditionDeclaration
Swift
public struct EmailValidator : Validator
-
The
NumericValidatorcontains anNumericCondition. A valid string only contains numbers.See moreSeealso
NumericConditionDeclaration
Swift
public struct NumericValidator : ConfigurableValidator
-
The
OptionalValidatorhas two stages of conditions. First theprimaryConditionis checked. If it is met, then the subsequentconditionare checked for violations. If theprimaryConditionis not met, then no violation is returned.As an example, say you only want violations to show if there is text in the field, but otherwise ignore it as it is an optional field in a form. In this case you would use a
See morePresentConditionas theprimaryConditionand your subsequent validation requirements as theconditions.Declaration
Swift
public struct OptionalValidator : Validator
-
The
PasswordStrengthValidatorcontains anPasswordStrengthCondition. A valid string meets the required strength level.See moreSeealso
PasswordStrengthConditionDeclaration
Swift
public struct PasswordStrengthValidator : ConfigurableValidator
-
The
PostcodeValidatorcontains anPostcodeCondition. A valid string is a postcode.See moreSeealso
PostcodeConditionDeclaration
Swift
public struct PostcodeValidator : ConfigurableValidator
-
The
PresentValidatorcontains anPresentCondition. A valid string is a non-empty string.See moreSeealso
PresentConditionDeclaration
Swift
public struct PresentValidator : Validator
-
The
RangeValidatorcontains anRangeCondition. A valid string meets the required string length.See moreSeealso
RangeConditionDeclaration
Swift
public struct RangeValidator : ConfigurableValidator
-
The
URLShorthandValidatorcontains anURLShorthandCondition. A valid string is a URL, with or without scheme.See moreSeealso
URLShorthandConditionDeclaration
Swift
public struct URLShorthandValidator : Validator
-
The
URLValidatorcontains anURLCondition. A valid string is a full URL with scheme.See moreSeealso
URLConditionDeclaration
Swift
public struct URLValidator : Validator
View on GitHub
Structures Reference