CLASS

FormField

Contents

public class FormField: Codable, Equatable

A based form field model that contains common properties. Subclasses should be used to access specific information.

Properties

name

public let name: String

The name of the field.

label

public let label: Message?

The label describing the purpose of the field to the user.

placeholder

public let placeholder: Message?

A hint for possible values of the field.

Methods

encode(to:)

public func encode(to encoder: any Encoder) throws

Parameters

Name Description
encoder The encoder to write data to.

init(from:)

public required init(from decoder: any Decoder) throws

Parameters

Name Description
decoder The decoder to read data from.

==(::)

public static func == (lhs: FormField, rhs: FormField) -> Bool

Parameters

Name Description
lhs A value to compare.
rhs Another value to compare.