class
SAPO.Component.MaskedInput
Version:
0.1
Since:
Defined in
Component/MaskedInput/0.1/lib.js
February 2011
Constructor Summary
Function Summary
returns a new MaskedInput component based on the factory name passed.
init()
returns the list of supported factory names
Boolean
validate()
Constructor Details
constructor MaskedInput
MaskedInput(String|InputElement
container, Object
options)
Parameters:
container
- input element or its id. If value attribute is set, serves as initial content.
options
-
String mask
- required -
[ String regex ]
- if not passed is computed from mask (in that case the output has fixed length!) -
[ String placeholderChar ]
- 1 character string to use as a placeholder (defaults to '_') -
[ Boolean casing ]
- if true, always uppercase, if false, always lowercase (defaults to undefined) -
[ Boolean signedMode ]
- if true, - and + ALWAYS replace first character (defaults to false) -
[ Boolean setCursorAtEnd ]
- if true, set the cursor position at the end of the string when the input is focused (defaults to true)
Function Details
function getInstance
MaskedInput
getInstance(String|HTMLElement
containerId, String
factoryName)
returns a new MaskedInput component based on the factory name passed.
Parameters:
containerId
factoryName
function init
init()
function listFactories
Array
listFactories()
returns the list of supported factory names
function validate
Boolean
validate()