RSDRegExValidatorObject

public struct RSDRegExValidatorObject : RSDCodableRegExMatchValidator

Undocumented

  • A localized custom regular expression that can be used to validate a string.

    Declaration

    Swift

    public let regExPattern: String
  • Undocumented

    Declaration

    Swift

    public init(regExPattern: String) throws
  • The regExPattern is used to represent the regex.

    Declaration

    Swift

    public var rawValue: String
  • Required initializer for conformance to RawRepresentable. This will return nil if the reg ex is not valid.

    Declaration

    Swift

    public init?(rawValue: String)
  • Declaration

    Swift

    public static func ==(lhs: RSDRegExValidatorObject, rhs: RSDRegExValidatorObject) -> Bool
  • Required initializer for conformance to Decodable.

    Throws

    DecodingError if the value is not a String or if the regExPattern throws an exception when creating an NSRegularExpression using this pattern.

    Declaration

    Swift

    public init(from decoder: Decoder) throws

    Parameters

    decoder

    The decoder to use to decode this value. This is expected to have a single value container.