Skip to content

scottkidder/ember-inputmask

 
 

Repository files navigation

Ember Inputmask

Build Status Ember Observer Score

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
  • Email
  • Number
  • US/Canada phone number
  • US SSN
  • US ZIP Code

Versions and Upgrading

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.

Installation

$ ember install ember-inputmask

One Way Input Mask

{{one-way-input-mask value mask='999-aaa-***' update=(action (mut value))}}

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.

Arguments

  • mask The type of mask to put on the input
  • options Any additional masking options from Inputmask you would like to add
{{one-way-input-mask value mask='999-aaa-***'
  options=(hash showMaskOnHover=false
    showMaskOnFocus=false)
  update=(action (mut value))}}

Other One Way Masks

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 95.8%
  • HTML 4.0%
  • CSS 0.2%