Class Banana.Controls.Decorators.Validator
Extends
Banana.Controls.Decorators.Decorator.
- Methods borrowed from class Banana.Controls.Decorators.Decorator:
- getDecoratedControl
- Methods borrowed from class Banana.Controls.Panel:
- getTagName
- Methods borrowed from class Banana.UiControl:
- addControl, addCss, addCssClass, getAttribute, getAttributes, getClientId, getCss, getCssClass, getDimensions, getHtmlAttributes, getState, getStyle, getStyleProperty, hasCssClass, registerEvents, removeAttribute, removeCssClass, removeState, setAttribute, setClientId, setCss, setEnabled, setState, setStyle, setVisible, switchCssClass, triggerEvent, unregisterEvents
- Methods borrowed from class Banana.Control:
- applyToChildren, bind, clear, findControl, generateUniqueId, getControls, getDomEventTypes, getFirstUiControl, getId, getPage, getParent, getProxy, hasBind, invalidateDisplay, onPreInvalidateContents, onWindowResize, remove, render, setId, setPage, setParent, unbind
Defined in: Validator.js.
Class Detail
Banana.Controls.Decorators.Validator(controlToValidate)
Creates base control to validate a control Any Banana.Controls.DataControl can be validated. If you need to change the eventtype where the validator is triggered on, use setValidateOnEventType. By default the validator will be triggered when the validated control fires a dataChanged or focusout event
- Parameters:
- {Banana.Controls.DataControl} controlToValidate
Method Detail
Manual way to invalidate the control
- Parameters:
- customText
- Returns:
- {this}
- Parameters:
- {mixed} data
- {boolean} ignoreEvent
- {boolean} ignoreDom
- Returns:
- {this}
- Parameters:
- {boolean} value
- if true when show a little dot in front of the control
default = dataChanged all dom events are supported, depending on the control type
- Parameters:
- {String} event
- type to validate on
- Returns:
- {this}
Use this method to put validators in a group
- Parameters:
- {String} group
- Returns:
- {this}