UFFormController can be used to bind properties from an object implementing UFModel to form elements. It takes care of validation and visual updates.

Constructors

Accessors

Methods

  • Adds (or replace) binding between input element and data property.

    Parameters

    • aProperty: string

      Name of property to bind to

    • anElement: string | HTMLElement

      Element to bind to

    • aVisualOptions: Partial<UFFormControllerVisualOptions> = {}

      An object with properties that determines how to show the visual state

    • anUpdate: boolean = false

      When true, update the value of the input value with the property value.

    Returns void

  • Checks if all bindings are valid. If there is an invalid binding and auto update is true start validating all bindings and update error visuals with every change.

    Returns boolean

    True=all bindings are valid, false=one or more bindings are invalid.