# @mikrav/reval

> Simple validation schema for Rescript.

Latest version **0.0.2** (published 2021-07-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mikrav/reval
pnpm add @mikrav/reval
yarn add @mikrav/reval
bun add @mikrav/reval
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2021-07-19 |
| First published | 2021-07-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 32.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | damaera |
| Maintainers | damaera |
| Keywords | rescript |

## Links

- npm: https://www.npmjs.com/package/@mikrav/reval
- npm.io page: https://npm.io/package/@mikrav/reval

## Dependencies (1)

- [rescript](https://npm.io/package/rescript.md) ^9.1.4

## Recent versions

- 0.0.2 (latest) — 2021-07-19
- 0.0.1 — 2021-07-08

## README

# Reval

Simple validation schema for Rescript.

## Install

```sh
npm install @mikrav/reval
```

## Usage
```re
open Reval

let schema = Schema.Dict(
  [RequiredKeys(["name", "age"])],
  [
    //
    ("name", String([MinLength(2)])),
    ("age", Int([GTE(0)])),
    ("description", String([NotEmpty])),
  ],
)

let input = Input.Dict([
  //
  ("name", String("Moona"))
  ("age", Int(3)),
  ("description", String("Hello"))
])

validate(schema, input)

// output:
// result<Input.t, Error.t>
```

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