An example of how to use the remote validation feature in Bootstrap Validator.
HTML JavaScript
Switch branches/tags
Nothing to show
Clone or download
Latest commit 1bf5271 Mar 25, 2015
Failed to load latest commit information.
.gitignore Initial commit. Mar 25, 2015 Initial commit. Mar 25, 2015
index.html Initial commit. Mar 25, 2015
index.js Initial commit. Mar 25, 2015
package.json Initial commit. Mar 25, 2015

Remote Validation Example

For Bootstrap Validator

See for the library to which this example refers.

Here's a simple little express server that implements a server-side validation endpoint for the remote validator to use. The validator expects a 200 OK response to mean the input is valid. Anything else is considered to be invalid, and the status text is used as the error message shown to the user.

NOTE: It seems like the better thing for the validator to do is to use the response text instead of the status text. This change will be made in a future version of the validator.

Running the example

Assuming you have node installed,

npm install
npm start