Ember Inputmask is an Ember addon and a wrapper of the Inputmask library. It provides a general use input masking component, along with a set of commonly used masks including:
- Credit card number
- Currency
- Date
- Number
- US/Canada phone number
- US SSN
- US ZIP Code
Inputmask (previously known as jquery.inputmask
) used to be a jQuery plugin,
but is now a standalone package without relying on jQuery.
Ember Inputmask currently has two branches:
-
v0.2.x pulls legacy jquery.inputmask 3.2.x from Bower. This branch is in maintenance mode. Critical bugs will be fixed, but minor issues will not be fixed and new features will not be added.
-
>v0.4.x pulls Inputmask 4.x.x from NPM. Bower and jQuery are not required.
Versions prior to 0.4.0 automatically add jquery.inputmask
into your
application's bower.json
file. If you are upgrading from a pre-0.4 version to
0.4.x, feel free to remove it from bower.json
.
In case you are using v0.3.0 of this addon -- it was a versioning mistake. In fact, v0.3.0 is older than v0.2.1 and we don't recommend it. Feel free to upgrade to the latest version of either v0.2.x or v0.4.x.
$ ember install ember-inputmask
This component follows the data-down-actions-up (DDAU) pattern. You should use the "one-way" components in this addon as the "non-one-way" versions are deprecated as of 0.5.0
and will be removed in 1.0.0
.
mask
The type of mask to put on the inputoptions
Any additional masking options from Inputmask you would like to add