2.0.0 • Published 1 year ago

@linch90/digit-only-directive v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

DigitOnlyDirective

A angular directive to allow digit only input.

Module

import { DigitOnlyDirectiveModule } from "@linch90/digit-only-directive";

Example

Stackblitz

<input
  type="text"
  class="form-control"
  id="digitOnlyInput"
  digitOnly
  [decimal]="true"
/>

API

Selector

inputdigitOnly,textareadigitOnly

NameDescription
decimaldefault: false, if support decimal
decimalSeparator'.', the separator of decimal
min-Infinity, the min value that allowed
maxInfinity, the max value that allowed
patternstring \| RegExp \| undefined, the digit pattern that allowed