[intro]     [up]

Class MaskBuilder


The MaskBuilder helps creating the field array to use in the InputMask.
There is a default instance called maskBuilder. There is no need to create other instances of this class.

Example
new InputMask(maskBuilder.parse("AA-####"), "input");
new InputMask(maskBuilder.accept(JST_CHARS_NUMBERS + "-./", 10), "input");
new InputMask(maskBuilder.letters(2), "input");



Methods
accept Returns a mask that accepts the specified characters
any A mask that only limits the size
capitalizeLetters A mask that allows only capitalized letters
decimal A mask that allows decimal numbers
letters A mask that allows only letters
lowerLetters A mask that allows only lowercase letters
parse Parses a String, returning the field array
upperLetters A mask that allows only uppercase letters




Methods
 
accept
Returns a mask that accepts the specified characters
Arguments
Name Type Default Description
chars String   The String containing the accepted characters
max Numeric unlimited The maximum size
 
any
A mask that only limits the size
Arguments
Name Type Default Description
max Numeric unlimited The maximum size
 
capitalizeLetters
A mask that allows only capitalized letters
Arguments
Name Type Default Description
max Numeric unlimited The maximum size
 
decimal
A mask that allows decimal numbers
 
letters
A mask that allows only letters
Arguments
Name Type Default Description
max Numeric unlimited The maximum size
 
lowerLetters
A mask that allows only lowercase letters
Arguments
Name Type Default Description
max Numeric unlimited The maximum size
 
parse
Parses a String, returning the field array. The following characters are accepted: #, 0 or 9 - A number, a or A - A letter, ? or _ - Any character, l or L - A lowercase letter, u or U - An uppercase letter, c or C - A capitalized letter, \\ - A backslash, \#, \0, ... - Those literal characters
Arguments
Name Type Default Description
text String   The String to be parsed
 
upperLetters
A mask that allows only uppercase letters
Arguments
Name Type Default Description
max Numeric unlimited The maximum size