Length
public struct Length : Codable, Sendable
A struct representing the min/max length constraints.
Conforms to Codable
for JSON encoding/decoding.
-
The minimum required length for a password.
Declaration
Swift
public let min: Int
-
The maximum allowed length for a password.
Declaration
Swift
public let max: Int
-
Initializes a new
Length
instance.Declaration
Swift
public init(from decoder: Decoder) throws
Parameters
decoder
The decoder to read data from.
-
Initializes a new
Length
configuration.Declaration
Swift
public init(min: Int = 0, max: Int = Int.max)
Parameters
min
The minimum required password length.
max
The maximum allowed password length.