-
A unique name.
Declaration
Swift
public let name: String
-
A validated value by the requirement.
Declaration
Swift
public var value: String
-
A regular expression for the value.
Declaration
Swift
public let requirement: String
-
A default value if the value is missing.
Declaration
Swift
public let defaultValue: DefaultValue?
-
Initializes a new instance or
nil
.Warning
It may returnnil
if the name is missing, the value doesn’t conform to the requirement, the requirement is invalid or the default value is invalid.Declaration
Swift
public init?(name: String, value: String = "", requirement: String = "", defaultValue: DefaultValue? = nil)
Parameters
name
A unique name.
value
A validated value by the requirement.
requirement
A regular expression for the value.
defaultValue
A default value if the value is missing.
-
A default value for the parameter.
See moreDeclaration
Swift
public enum DefaultValue : CustomStringConvertible, Equatable
-
A generated pattern for the parameter.
Declaration
Swift
public var pattern: String { get }
-
See
Hashable
.Declaration
Swift
public func hash(into hasher: inout Hasher)
-
See
CustomStringConvertible
.Declaration
Swift
public var description: String { get }