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
Lengthinstance.Declaration
Swift
public init(from decoder: Decoder) throwsParameters
decoderThe decoder to read data from.
-
Initializes a new
Lengthconfiguration.Declaration
Swift
public init(min: Int = 0, max: Int = Int.max)Parameters
minThe minimum required password length.
maxThe maximum allowed password length.
View on GitHub