1.2.5 • Published 6 months ago

purevalid v1.2.5

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

Purevalid 🛡️

Purevalid is a lightweight validation package designed for simple and efficient data validation in JavaScript projects. It is built with zero external dependencies, making it easy to integrate into various applications.

Installation

You can install the package using either NPM or Yarn. Run one of the following commands in your project directory:

  1. NPM

    npm install purevalid
  2. Yarn

    yarn add purevalid

Example Usage

To use the purevalid package for data validation, follow the instructions below:

import { validate } from "purevalid";

const inValidInputs = validate([
  {
    name: "Name",
    value: "ja",
    validators: ["string", "null", "min|3", "max|10"], //min and max must be last
  },
  {
    name: "Email",
    value: "john@mail.com",
    validators: ["email"],
  },
  {
    name: "Age",
    value: 36,
    validators: ["number", "min|18", "max|35"],
  },
]);

console.log(invalidInputs);

Standard validators

standardValidators = ['number', 'string','phone', 'email', 'password', 'date', 'null, 'min', 'max']

You can use various methods provided by purevalid to validate different types of data such as strings, numbers, emails, and more.

Contribution 😊

Contributions to this package are welcome and greatly appreciated. You can contribute by fixing bugs, suggesting new features, improving documentation, or enhancing the existing functionalities. To contribute, follow these steps:

  1. Fork the repository on GitHub.
  2. Make the desired changes or improvements.
  3. Submit a pull request with a clear description of your changes and their benefits.

Your contributions will help make purevalid more reliable and effective for the community.

Feel free to reach out to the package maintainer for any questions or support related to the package.

Please customize the documentation further to provide more information about specific use cases and functionalities of your purevalid validation package.

1.2.5

6 months ago

1.2.4

6 months ago

1.2.2

6 months ago

1.2.1

6 months ago

1.2.0

6 months ago

1.1.0

6 months ago

1.0.0

6 months ago