Skip to content
/ Zheker Public

A simple validator and xss filter for expressjs.

Notifications You must be signed in to change notification settings

myesua/Zheker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Zheker

A simple validator and xss filter for expressjs.

Still in beta....

For testing purposes only

Create a route, for example

import express from 'express';
const router = express.Router();
import auth from '../controllers/auth.js'; // path to authentication logic
import Check from '/path-to-check.js';

router.post('/', Check('email').isEmail(), auth);
router.post('/', Check('password').isPassword(), auth);

isEmail() checks if the req.body.email is a valid email address,

isPassword() checks if the req.body.password is a valid password

Others are isFirstName(), isLastName(), isPhone(), isShortText(), isLongText(). These functions each validate input and filter out dangerous entries.

About

A simple validator and xss filter for expressjs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published