LiveInput Class
_views\_components\LiveInput.js:1
Widget to display live editor of label / input Will fire LIVE_INPUT_CHANGED on data changed and also will fire a custom event if one was give via options.customEvent Powered by the awesome validator: https://github.com/chriso/validator.js
Constructor
LiveInput
()
Object
Returns:
instantiated LiveInput
Item Index
Methods
_extendValidator
()
Boolean
Adding our own validation rules
Returns:
pass or fail
_listenUp
()
Listen to up button increasing meters
_listenUp
-
i_value
-
i_announce
-
i_ignoreValidation
Set value and announce the change only announce if set to true
Parameters:
-
i_value
String -
i_announce
Boolean -
i_ignoreValidation
Boolean
_validated
-
i_value
Validate against all the given rules per instance
Parameters:
-
i_value
Number
Returns:
status of array of error messages
getValidator
()
Object
Return the validator object so caller can reference the isXXX functions as validation rules
Returns:
validator object
getValue
()
String
Get current input value
Returns:
value
initialize
()
Constructor
rules
-
the
Enable validation via config object
Parameters:
-
the
Objectconfig objects uses a AND rule and so ALL rules must match for no error message to display. if any error we return it in the array of errors.