Type Alias UFFormControllerVisualOptions

UFFormControllerVisualOptions: {
    dependentProperties: string[];
    errorClass: string;
    errorElements: (string | HTMLElement)[];
    hideElements: (string | HTMLElement)[];
    normalClass: string;
    updateCallback: null | (valid: boolean) => void;
}

Type declaration

  • dependentProperties: string[]

    Names of properties whose visual state should also be updated whenever the visual state of this binding gets updated. (default = [])

  • errorClass: string

    Css class to add to the element when the value is invalid (default = '')

  • errorElements: (string | HTMLElement)[]

    Array of elements to show when there is an error (default = [])

  • hideElements: (string | HTMLElement)[]

    Array of elements to hide when field changes value. This can be used for example to hide feedback from the server when the user starts entering/changing data. (default = [])

  • normalClass: string

    Css class to add to the element when there is no error or UFFormController.autoUpdate is false (default = '')

  • updateCallback: null | (valid: boolean) => void

    A function that should expect one boolean parameter that indicates the field is valid or not.