Property Validator

screenshot of Property Validator
express

:white_check_mark: Easy property validation for JavaScript, Node and Express.

Overview

property-validator is a JavaScript library for easy property validation in Node.js and Express applications. Built on top of validator.js, it simplifies the process of validating request parameters without chaining or prototype violations. This library offers a suite of validation functions to make request validation simple and efficient, especially when combined with web servers.

Features

  • Easy to Use: Simple, stateless JavaScript functions for property validation.
  • Request Validation: Validate request parameters, query string, body, and headers.
  • Assert Middleware: Standard middleware to handle assertion errors.
  • Advanced Usage: Extensible for optional validation, custom error messages, and custom validation functions.
  • TypeScript Support: Compatible with TypeScript for type-safe validation.

Summary

property-validator is a versatile JavaScript library for simplifying request parameter validation in Node.js and Express applications. With features like assert functions to halt program execution and validate functions to return validation results, it offers an easy-to-use solution for ensuring data integrity in web servers. By providing support for custom error messages, optional validation, and TypeScript compatibility, property-validator enhances the validation process for developers, making it an essential tool for building robust applications.

express
Express

Express.js is a simple Node.js framework for single, multi-page, and hybrid web applications.