ngx-mask-input
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

ngx-mask-input

NPM Version NPM Size + Gzip NPM Downloads NPM License

Library helps you to prevent users from writing or pasting values in inputs, that you don't want to allow. You can pass regular expression to your inputs "mask" attribute, and the things will be managed by itself.

Table of Contents

Installation

npm install --save ngx-mask-input
yarn add ngx-mask-input

Usage

app.module.ts

import { NgModule } from '@angular/core';
import { NgxMaskInputModule } from 'ngx-mask-input';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [ AppComponent ],
  imports: [ NgxMaskInputModule ],
  bootstrap: [ AppComponent ]
})
export class AppModule { }

app.component.html

<!-- Allow only numbers -->
<input type="text" mask="[0-9]">

<!-- Allow only lowercase letters -->
<input type="text" mask="[a-z]">

<!-- Allow only latin letters, numbers and underscore -->
<input type="text" mask="[a-zA-Z0-9_]">

Changelog

Please see Changelog Page for more information what has changed recently.

Paperwork

Contributing

Please see CONTRIBUTING.md for details.

Issue / Feature Request

To submit an issue correctly, please follow instructions

If you have an idea, and you want to request feature, then read this one

Pull Request

To crearte new pull request and add your piece of work in our project, go through this steps

Credits

License

The MIT License (MIT). Please see License file for more information.

Package Sidebar

Install

npm i ngx-mask-input

Weekly Downloads

216

Version

1.0.1

License

MIT

Unpacked Size

38.3 kB

Total Files

18

Last publish

Collaborators

  • npm-zgabievi
  • kvirrik