# purevalid

> JS validation package for both client side and server side

Latest version **1.2.5** (published 2023-11-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install purevalid
pnpm add purevalid
yarn add purevalid
bun add purevalid
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.5 |
| Published | 2023-11-05 |
| First published | 2023-11-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Joseph owigo |
| Maintainers | owigo |
| Keywords | js, validator, front-end, validator, simple, validator |

## Links

- npm: https://www.npmjs.com/package/purevalid
- npm.io page: https://npm.io/package/purevalid

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.2.5 (latest) — 2023-11-05
- 1.2.4 — 2023-11-05
- 1.2.2 — 2023-11-05
- 1.2.1 — 2023-11-05
- 1.2.0 — 2023-11-05
- 1.1.0 — 2023-11-05
- 1.0.0 — 2023-11-05

## README

# 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:

```javascript
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.

---
_Source: https://npm.io/package/purevalid · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
