# lv-validation

> lv-validation is a Javascript library that provides a comprehensive set of validation rules for incoming form data

Latest version **1.1.32** (published 2023-03-31) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install lv-validation
pnpm add lv-validation
yarn add lv-validation
bun add lv-validation
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.32 |
| Published | 2023-03-31 |
| First published | 2023-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 100.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ali Yaghoubi |
| Maintainers | iamaliybi |
| Keywords | validation, form-validation, validation-library, validation-js |

## Links

- npm: https://www.npmjs.com/package/lv-validation
- Repository: https://github.com/iamaliybi/lv-validation
- Issues: https://github.com/iamaliybi/lv-validation/issues
- npm.io page: https://npm.io/package/lv-validation

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.32 (latest) — 2023-03-31
- 1.1.3 — 2023-03-31
- 1.1.2 — 2023-03-31
- 1.1.0 — 2023-03-31
- 1.0.0 — 2023-03-30

## README

# Laravel Validation is now available for Javascript (lv-validation)

A powerful tool for developers to validate form inputs on both the front and back end. This library is designed to provide a simple and flexible way to ensure that user input is properly formatted and meets the necessary requirements.

Whether you're building a web application, a mobile app, or a desktop program, this validation library can help you reduce errors and improve the user experience. With easy integration and a simple API, you can quickly add validation to your project without adding unnecessary complexity.

<br />

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)

<br />

## Installation

Explain how to install your project, including any dependencies that need to be installed first.

```
npm i lv-validation
```

<br />

## Usage

If you're familiar with Laravel validation, you'll find our JavaScript library to be very similar. Our library provides a flexible and easy-to-use API for validating user input in your web applications. [Laravel documentation](https://laravel.com/docs/9.x/validation)

Here's a quick example of how to use our library:

```javascript
import Validation from 'lv-validation';

// Define the validation rules
const rules = {
  name: ['required', 'string','max:255'],
  email: ['required', 'email' ,'max:255'],
  password: ['required', 'string', 'min:8'],
};

// Validate the input
const input = {
  name: 'John Doe',
  email: 'johndoe@example.com',
  password: 'password123'
};

const validator = (new Validation(rules)).validate(input);

if (validator.passes()) {
  // Continue with your application logic
} else {
  // Display the validation errors to the user
  const errors = validator.errors();
  console.log(errors);
}
```

<br />

## Contributing

Please follow these guidelines if you want to contribute to the project.

1. Fork the project
2. Create a new branch (`git checkout -b feature`)
3. Make your changes
4. Commit your changes (`git commit -am 'Added a new feature'`)
5. Push to the branch (`git push origin feature`)
6. Create a Pull Request

<br />

## License

This project is licensed under the [MIT License](https://opensource.org/licenses/MIT). You are free to use, modify, and distribute this software as you see fit. See the `LICENSE` file for more details.

<br />

## Connect with me

- [LinkedIn](https://www.linkedin.com/in/iamaliybi)
- [Github](https://github.com/iamaliybi)
- [Website](https://iamaliybi.dev)
- [Stackoverflow](https://stackoverflow.com/users/11662335/ali-yaghoubi)
- [E-Mail](mailto:iamaliybi.dev@gmail.com)

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