/MaskerJS

Vanilla Javascript (dependency free) mask plugin to input form elements

Primary LanguageJavaScriptMIT LicenseMIT

MaskerJS

Vanilla Javascript mask plugin to input form elements.

Super lightweight plugin for masking input form elements (<6kB minified).

It currently supports the following mask types:

  • Brazilian CPF
  • Brazilian CNPJ
  • Brazilian CEP (zip code)
  • Phone numbers (with area code and 8 or 9 digits of number)
  • Date
  • Time
  • Datetime
  • Month/Year
  • Year/Month
  • Monetary (current Cultures: en-US and pt-BR)
  • CreditCard (VISA, Mastercard, AMEX, Diners, Discover, Hipercard and Aura)
  • Number (pure)
  • Float
  • Percent

Roadmap

Add support to custom mask.

Usage

Se index.html file included (playground).