Skip to content

Installation (v3)

Install the package

bootstrap-validate can be used from npm or as a browser script. Version 2.3.0 is the final Bootstrap 4 compatible release.

Package Managers

Terminal window
npm install bootstrap-validate

Modern CDN

Prefer a maintained npm CDN for browser-only usage. Pin a version when you need reproducible builds.

<script src="https://cdn.jsdelivr.net/npm/bootstrap-validate@2.3.0/dist/bootstrap-validate.js"></script>

Bundlers

import bootstrapValidate from 'bootstrap-validate';
bootstrapValidate('#email', 'email:Enter a valid email address');

Version 3 is planned as the Bootstrap 5 refactor. Until it is released, use v2.3.0 for production Bootstrap 4 projects.