Class DwtInputField
CSS Elements
Defined in: DwtInputField.js.
Class Detail
DwtInputField(params)
Creates an input field.
Author: Ross Dargahi.
Field Detail
<static>
DwtInputField.CONTINUAL_VALIDATION
Validate field after each character is typed.
<static>
DwtInputField.DATE
Defines the "Date input field" data type.
<static>
DwtInputField.ERROR_ICON_LEFT
Defines the "left" error icon style.
<static>
DwtInputField.ERROR_ICON_NONE
Defines the "none" error icon style.
<static>
DwtInputField.ERROR_ICON_RIGHT
Defines the "right" error icon style.
<static>
DwtInputField.FLOAT
Defines the "Numeric input field" data type.
<static>
DwtInputField.INTEGER
Defines the "Integer input field (no floating point numbers)" data type.
<static>
DwtInputField.MANUAL_VALIDATION
Validate the field manually.
<static>
DwtInputField.NUMBER
Defines the "Integer or float input field" data type.
<static>
DwtInputField.ONEXIT_VALIDATION
Validate the field (i.e. after TAB or CR).
<static>
DwtInputField.PASSWORD
Defines the "Password input field" data type.
<static>
DwtInputField.STRING
Defines the "String input field" data type.
Method Detail
applySubstitution(regex, replacement)
Applies a regular expression to the contents of this input field, retaining
selection and carent location if supported by the browser.
{Element}
getInputElement()
Gets the internal native input element
{boolean}
getRequired()
Gets the required flag.
getValidationError()
Checks the validity of the input field value; returns the error message, if any.
{string}
getValue()
Gets the input field current value.
{string}
isValid()
Checks the validity of the input field value.
setHint(hint)
Sets the hint for the input field.
setInputType(type)
Sets the input type.
setLabel(label)
Sets the ARIA label for the input field.
setNumberPrecision(decimals)
Sets the number precision.
setReadOnly(readonly)
Sets the read only flag.
setRequired(required)
Sets the required flag.
setValidationCallback(callback)
Sets a validation callback. This callback is invoked any time
the input field is validated. The callback is invoked with two
parameters. The first
params[0] is the value of the input field.
The second params[1] is a {Boolean} that if true indicates if the value is valid.
setValidatorFunction(obj, validator)
Sets the validator function. This function is executed during validation.
setValidatorRegExp(regExp, errorString)
Sets the validator to be a regular expression instead of a function.
setValidNumberRange(min, max)
Sets a valid number range. This method is only applicable for numeric input fields. It sets
the valid range (inclusive) of numeric values for the field
setValidStringLengths(min, max)
Sets a valid string length.
setValue(value, noValidate)
Sets the value for the input field.
setVisible(visible)
Sets the visibility flag.
{boolean}
validate()
Validates the current input in the field. This method should be called
if the validation style has been set to DwtInputField.MANUAL_VALIDATION
and it is time for the field to be validated
<static>
{boolean}
DwtInputField.validateDate(value)
Validates a date.
<static>
{boolean}
DwtInputField.validateEmail(value)
Validates an email.
<static>
{boolean}
DwtInputField.validateFloat(value)
Validates a float.
<static>
{boolean}
DwtInputField.validateInteger(value)
Validates an integer.
<static>
{boolean}
DwtInputField.validateNumber(value)
Validates a number.
<static>
{boolean}
DwtInputField.validateString(value)
Validates a string.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:28 GMT-0400 (EDT)
|