RSDRegExValidatorObject
public struct RSDRegExValidatorObject : RSDCodableRegExMatchValidator
The RSDRegExValidatorObject is a concrete implementation of the RSDCodableRegExMatchValidator
that can be used to create a regex validation of an input string using a regex pattern.
-
A localized custom regular expression that can be used to validate a string.
Declaration
Swift
public let regExPattern: String -
Default initializer.
Declaration
Swift
public init(regExPattern: String) throwsParameters
regExPatternThe regular expression pattern.
-
The
regExPatternis used to represent the regex.Declaration
Swift
public var rawValue: String { get } -
Required initializer for conformance to
RawRepresentable. This will returnnilif the reg ex is not valid.Declaration
Swift
public init?(rawValue: String)
-
Required initializer for conformance to
Decodable.Throws
DecodingErrorif the value is not aStringor if theregExPatternthrows an exception when creating anNSRegularExpressionusing this pattern.Declaration
Swift
public init(from decoder: Decoder) throwsParameters
decoderThe decoder to use to decode this value. This is expected to have a single value container.
View on GitHub
RSDRegExValidatorObject Structure Reference