Input masker


Hubble's Input masker class allows you to easily mask inputs to a predefined set of input rules (e.g numbers only).

To access the Input masker module, use the InputMasker key via the module loader. Pass the DOM node to the constructor.



To mask a credit card, use the creditcard() method.



To mask for money, use the money() method.



To mask only numbers, use the numeric method.



To mask numbers with decimals, use the numericDecimal() method.



To mask numbers letters and numbers, use the alphaNumeric() method.



To mask letters with spaces, use the alphaSpace() method.



To mask letters with hyphens use the alphaDash() method.



To mask letters, numbers and hyphens use the alphaNumericDash() method.



To mask a pattern, use the pattern() method.



To remove all masks use the remove() method.