# front-end-validation

> Validate javascript or typescript objects.

Latest version **1.2.2** (published 2021-11-11) · 0 weekly downloads

## Install

```sh
npm install front-end-validation
pnpm add front-end-validation
yarn add front-end-validation
bun add front-end-validation
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2021-11-11 |
| First published | 2021-07-24 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 113.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | adrijan9 |

## Links

- npm: https://www.npmjs.com/package/front-end-validation
- Homepage: https://github.com/adrijan9/front-end-validation/blob/main/README.md
- Issues: https://github.com/adrijan9/front-end-validation/issues
- npm.io page: https://npm.io/package/front-end-validation

## Dependencies (1)

- [moment](https://npm.io/package/moment.md) ^2.29.1

## Recent versions

- 1.2.2 (latest) — 2021-11-11
- 1.2.1 — 2021-07-24
- 1.2.0 — 2021-07-24
- 1.1.3 — 2021-07-24
- 1.1.2 — 2021-07-24
- 1.0.0 — 2021-07-24

## README

# front-end-validation
Validate javascript or typescript objects.

# Installation
```npm i front-end-validation```

# Example

````javascript
validate({
            email: {
                value: email.value,
                rules: {
                    required: true,
                    email: true
                },
                element: email
            },
            password: {
                value: password.value,
                rules: {
                    required: true
                },
                element: password
            }
        })
            .then(() => {
                // submit form or something else
            })
            .catch(error => {
                const { errors, model } = error;

                // do your things here
            });
````

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