PasswordCollector
public class PasswordCollector : ValidatedCollector, ContinueNodeAware, Closeable, @unchecked Sendable
Class representing a PASSWORD Type.
This class inherits from the ValidatedCollector class and implements the Closeable and Collector protocols.
It is used to collect password data.
-
The continue node for the DaVinci flow. Declared
weakto break the retain cycle:ContinueNode → PasswordCollector → ContinueNode.Declaration
Swift
public weak var continueNode: ContinueNode? -
A flag to determine whether to clear the password or not after submission.
Declaration
Swift
public var clearPassword: Bool -
Initializes a new instance of
PasswordCollector. Extracts the password policy from the field-level JSON if present.Declaration
Swift
public required init(with json: [String : Any])Parameters
jsonThe JSON dictionary for this field component.
-
Overrides the close function from the Closeable protocol. It is used to clear the value of the password field when the collector is closed.
Declaration
Swift
public func close() -
Method to retrieve the password policy, if available. Checks the field-level (component scope) first, then falls back to the global scope for backward compatibility with older server responses.
Declaration
Swift
public func passwordPolicy() -> PasswordPolicy?Return Value
The password policy, if available.
-
Declaration
Swift
public override func validate() -> [ValidationError]
View on GitHub