1.0.7 • Published 4 months ago

@angular-magic/ngx-validator v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

ngx-validator

Demo: https://ngx-validator.angularmagic.com

This module contains validator component which automatically show message depending by control's validations.

NPM

Installation

npm

npm install @angular-magic/ngx-validator

yarn

yarn add  @angular-magic/ngx-validator

Usage

  1. Add a module into your application (as a rule app.module.ts)
import { NgxValidatorModule } from "@angular-magic/ngx-validator";

@NgModule({
  imports: [NgxValidatorModule, BrowserModule, ReactiveFormsModule, ...],
  ...
})
  1. Add component under your input or controllable UI component
<input type="text" [formControl]="myFormControl" />
<ngx-validator [control]="myFormControl" customName="Name"></ngx-validator>

Options

Validator component support a couple of additional @Input, list of them you can check below:

NameTypeDefault valueDescription
controlAbstractControl or FormControlControl from which validator will extract validations and show error messages.
customNamestringBy default name of control is extracted from parent name (ex: if we have FormGroup which have FormControl lastName then name of validation will Last Name).
customValidationCustomValidation or CustomValidation[]In case when we need to overwrite default validation messages or add something custom which don't exists in service.

GitHub

Please feel free to declare issues or contribute: https://github.com/angular-magic/ngx-validator

1.0.7

4 months ago

1.0.6

1 year ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago