formcheckr

1.0.4 • Public • Published

Form Checkr

Form checkr is a lightweight, dependency free form validator for express applications.

Installing

Now that db helper's dependencies have been installed download and install the db helper npm package to your local project.

npm install formcheckr --save

This will install Form Checkr to your local project's modules.

Usage

To call form checkr within your file you must first import it like so:

var formcheckr = require('formcheckr');

An example of how to use form checkr:

let myForm = formcheckr.isValidForm(req.body, ['email', 'password']);

Form checkr will make sure that the form object (the request body in this example) only contains your permitted fields (in this case email & password) and returns the validated form. If fields are missing then Form checkr will return an error with all the fields that are missing.

Readme

Keywords

none

Package Sidebar

Install

npm i formcheckr

Weekly Downloads

1,268

Version

1.0.4

License

MIT

Unpacked Size

1.72 kB

Total Files

4

Last publish

Collaborators

  • christofer198