BASIS Input Masking

A small javascript library to force inputs masking using BBj supported masks



Text Input


The TextInput will wrap text inputs and apply the given bbj string mask. You can combine masks with patterns to get accurate validation. In case the input lives in a form then the masked and the unmasked values will be submitted when the form is submitted


IE11 / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
iOS Safari
iOS Safari
Opera
Opera
IE11, Edge last 2 versions last 2 versions last 2 versions last 2 versions last 2 versions
Example : 11/2018 - Mask : 00/0000 - Pattern : ((0[1-9])|(1[0-2]))\/((2009)|(20[1-2][0-9]))
5-digit zip code - Mask : 00000 - Pattern : None
German phone number - Mask +(00) 000 000 000 00 - Pattern : None
German IBAN - Mask : AA 00 0000 0000 0000 0000 00 - Pattern : None





Number Input


The NumberInput will wrap text inputs and apply the given bbj number mask. In case the input lives in a form then the masked and the unmasked values will be submitted when the form is submitted


 Edge
Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
iOS Safari
iOS Safari
Opera
Opera
Edge last 2 versions last 2 versions last 2 versions last 2 versions last 2 versions

Mask : ##,##0