Interface KnockoutBindingHandlers

Valerie BindingHandlers

Index

Index signatures

Properties

Index signatures

(bindingHandler: string): KnockoutBindingHandler

Parameters

  • bindingHandler: string

Returns

KnockoutBindingHandler

Properties

public attr: KnockoutBindingHandler

public checked: KnockoutBindingHandler

public click: KnockoutBindingHandler

public css: KnockoutBindingHandler

public disable: KnockoutBindingHandler

public disabledWhenNotValid: KnockoutBindingHandler

Disables the element when the chosen property or model has failed or is pending validation, enabled otherwise.

name

ko.bindingHandlers.disabledWhenNotValid

public disabledWhenTouchedAndNotValid: KnockoutBindingHandler

Disables the element when the chosen property or model has been touched and has failed or is pending validation, enabled otherwise.

name

ko.bindingHandlers.disabledWhenTouchedAndNotValid

public enable: KnockoutBindingHandler

public enabledWhenApplicable: KnockoutBindingHandler

Enables the element when the chosen property or model is applicable, disabled otherwise.

name

ko.bindingHandlers.enabledWhenApplicable

public event: KnockoutBindingHandler

public foreach: KnockoutBindingHandler

public formattedText: KnockoutBindingHandler

Sets the text of the element to be a formatted representation of the specified property.

name

ko.bindingHandlers.formattedText

public hasfocus: KnockoutBindingHandler

public html: KnockoutBindingHandler

public if: KnockoutBindingHandler

public ifnot: KnockoutBindingHandler

public options: KnockoutBindingHandler

public selectedOptions: KnockoutBindingHandler

public style: KnockoutBindingHandler

public submit: KnockoutBindingHandler

public template: KnockoutBindingHandler

public text: KnockoutBindingHandler

public uniqueName: KnockoutBindingHandler

public validatedChecked: KnockoutBindingHandler

Validates entries that can be checked, i.e. check boxes and radio buttons. Functions in the same way as the ko.bindingHandlers.checked binding handler, with the following alterations:

  • registers a blur event handler so validation messages for selections can be displayed
  • registers a click event handler so validation state can be marked as touched
name

ko.bindingHandlers.validatedChecked

public validatedSelectedOptions: KnockoutBindingHandler

Validates options selected in a select list. Functions in the same way as the ko.bindingHandlers.selectedOptions binding handler, with the following alterations:

  • registers a blur event handler so validation messages for selections can be displayed
  • registers a click event handler so validation state can be marked as touched
name

ko.bindingHandlers.validatedSelectedOptions

public validatedValue: KnockoutBindingHandler

Validates entries that can be keyed or selected. Functions in the same way as the ko.bindingHandlers.value binding handler, with the following alterations:

  • registers a blur event handler:
    • to display validation messages as entries or selections lose focus
    • to reformat successfully parsed textual entries
  • registers a focus event handler to pause the update of any existing visible validation message
  • registers a key-up event handler which validates the entry as it's being entered; this allows other entries that are shown conditionally to be available before the user tabs out of this entry
name

ko.bindingHandlers.validatedValue

public validationCss: KnockoutBindingHandler

Sets CSS classes on the element based on the validation state of the chosen property or model.
The names of the CSS classes used are held in the ko.bindingHandlers.validationCss.classNames object, by default they are:

  • failed - if validation failed
  • focused - if the element is in focus
  • passed - if validation passed
  • pending - if validation is pending
  • required - if an entry is required
  • showMessage - if a validation message should be shown
  • touched - set if the model or entry has been "touched"
  • untouched - set if the model or entry has not been "touched"
name

ko.bindingHandlers.validationCss

public validationMessage: KnockoutBindingHandler

Makes the element behave like a validation message for the chosen property or model:

  • makes the element visible if the value is invalid
  • sets the text of the element to be the underlying validation state's message
name

ko.bindingHandlers.validationMessage

public validationMessageText: KnockoutBindingHandler

Sets the text of the element to be the underlying validation state's message.

name

ko.bindingHandlers.validationMessageText

public validationName: KnockoutBindingHandler

Sets the text of the element to be the underlying validation state's name.

name

ko.bindingHandlers.validationName

public value: KnockoutBindingHandler

public visible: KnockoutBindingHandler

public visibleWhenApplicable: KnockoutBindingHandler

Makes the element visible if the chosen property or model is applicable, invisible otherwise.

name

ko.bindingHandlers.visibleWhenApplicable

public visibleWhenFocused: KnockoutBindingHandler

Makes the element visible when the entry bound to the chosen property is in focus, invisible otherwise.

name

ko.bindingHandlers.visibleWhenFocused

public visibleWhenInvalid: KnockoutBindingHandler

Makes the element visible when the chosen property or model has failed validation, invisible otherwise.

name

ko.bindingHandlers.visibleWhenInvalid

public visibleWhenSummaryNotEmpty: KnockoutBindingHandler

Makes the element visible when the summary for the chosen model is not empty, invisible otherwise.

name

ko.bindingHandlers.visibleWhenSummaryNotEmpty

public visibleWhenTouched: KnockoutBindingHandler

Makes the element visible if the chosen property or model has been touched, invisible otherwise.

name

ko.bindingHandlers.visibleWhenTouched

public visibleWhenUntouched: KnockoutBindingHandler

Makes the element visible if the chosen property or model is untouched, invisible otherwise.

name

ko.bindingHandlers.visibleWhenUntouched

public visibleWhenValid: KnockoutBindingHandler

Makes the element visible if the chosen property or model has passed validation.

name

ko.bindingHandlers.visibleWhenValid

public with: KnockoutBindingHandler