OSGiMaskedTextField - Vaadin Add-on Directory
OSGiMaskedTextFieldAn extension to the TextField to allow the developer to specify a mask. It's an pure Vaadin/GWT implementation with no external dependencies.
It is still experimental, so if you find any bug or have a suggestion please let me know.
You can use it the same way you use the default TextField, listening to the same events or calling the same methods, the mask is the only difference. The input should satisfy the mask in order to be considered valid.
Currently available masks:
# - any digit
U - upper-case letter
L - lower-case letter
? - any letter
A - any number or character
* - anything
H - hex sign (0-9, a-f or A-F)
' - Escape character, used to escape any of the special formatting characters.
~ - +/- sign
Any character not matching one of the above mask character or if it escaped with the single quote character (') is considered to be a literal.
Some mask examples:
Phone Number: (###) ###-####
USPS Express Mail: EU#########'US
Date / time: ##/##/#### ##:##
State: UU
HTML Color: '#HHHHHH
An capitalized 6 letter word: ULLLLL