README
NgxCzId
Angular input for czech identification number (IČO) with validation.
Quick Start
- Import
NgxCzInModule
to your project.
import { NgxCzInModule } from '@stumpam/ngx-cz-in';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, NgxCzInModule, ReactiveFormsModule],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
- Use in HTML template
- add attributes min or max to validate even age of person with current id
<input ngxCzId [formControl]="ctrl" [options]="options">
- Optional options to emit only valid cz id value
options: {
emitInvalid: false;
// emits all typed characters not just valid / invalid complete id
emitAll: boolean;
// it automatically add leading zeros for ins with them
addLeadingZero: boolean;
}
Automatically emits invalidCzIn
when length of string is valid but number is not valid identification number.
formly
Works withand use it in the template
<input ngxCzIn [formControl]="formControl" [options]="to.czInOptions>