This repository has been archived by the owner on Jan 5, 2022. It is now read-only.
Releases: third774/ng-bootstrap-form-validation
Releases · third774/ng-bootstrap-form-validation
v9.0.1
v9.0.0-1
v9.0.0
v5.0.0
v3.0.3
v3.0.2
v3.0.1
v3.0.0
New Features
Supports Bootstrap 4!
Breaking Changes
-
Requires Angular 6
-
NgBootstrapFormValidationModule.forRoot()
now accepts an object with configuration options instead of just an array for custom error messages. Furthermore, it defaults toBootstrapVersion.Four
so if you want to continue using it with Bootstrap 3, you'll need to pass in this additional argument. Alternatively, you may also provide theBootstrapVersion
value using theBOOTSTRAP_VERSION
token.
import {
NgBootstrapFormValidationModule,
BootstrapVersion,
BOOTSTRAP_VERSION
} from 'ng-bootstrap-form-validation';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
FormsModule,
ReactiveFormsModule,
NgBootstrapFormValidationModule.forRoot({
bootstrapVersion: BootstrapVersion.Three, // Defaults to Four
customErrorMessages: []
})
],
providers: [
// Alternatively, you can provide the BootstrapVersion value
// using the BOOTSTRAP_VERSION token
// {
// provide: BOOTSTRAP_VERSION,
// useValue: BootstrapVersion.Three
// }
],
bootstrap: [AppComponent]
})
export class AppModule {}