ObservableState

public protocol ObservableState

The state of an input that Forage exposes during events or statically as input instance attributes.

  • isFirstResponder is true if the input is focused, false otherwise.

    Declaration

    Swift

    var isFirstResponder: Bool { get }
  • isEmpty is true if the input is empty, false otherwise.

    Declaration

    Swift

    var isEmpty: Bool { get }
  • isValid is true when the input text does not fail any validation checks with the exception of target length; false if any of the validation checks other than target length fail.

    Declaration

    Swift

    var isValid: Bool { get }
  • isComplete is true when all validation checks pass and the input is ready to be submitted.

    Declaration

    Swift

    var isComplete: Bool { get }