FieldCollector
Abstract class representing a field collector.
- property type: The type of the field collector.
- property key: The key of the field collector.
- property label: The label of the field collector.
- property id The UUID of the field collector.
-
Declaration
Swift
public private(set) var type: String { get } -
Declaration
Swift
public private(set) var key: String { get } -
Declaration
Swift
public private(set) var label: String { get } -
Declaration
Swift
public private(set) var required: Bool { get } -
Declaration
Swift
public var id: String { get } -
Initializes a new instance of
FieldCollector.Declaration
Swift
public init() -
Initializes a new instance of
FieldCollector.Declaration
Swift
required public init(with json: [String : Any])Parameters
jsonThe json to initialize from.
-
Initializes
FieldCollectorwith the given value. This implementation does nothing. Subclasses should override this method as needed.Declaration
Swift
public func initialize(with value: Any)Parameters
inputThe value to initialize with.
-
Validates the field collector. Returns an array of validation errors.
Declaration
Swift
public func validate() -> [ValidationError] -
Function returning the
Payloadof the FieldCollector.Declaration
Swift
open func payload() -> T? -
Type-erased version of payload()
Declaration
Swift
public func anyPayload() -> Any?
View on GitHub