# restify-joi-mw

> restify-joi-mw ==============

Latest version **0.0.0** (published 2014-09-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install restify-joi-mw
pnpm add restify-joi-mw
yarn add restify-joi-mw
bun add restify-joi-mw
```

## 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.0 |
| Published | 2014-09-19 |
| First published | 2014-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | dscape |

## Links

- npm: https://www.npmjs.com/package/restify-joi-mw
- Repository: https://github.com/yldio/restify-joi-mw
- Issues: https://github.com/yldio/restify-joi-mw/issues
- npm.io page: https://npm.io/package/restify-joi-mw

## Recent versions

- 0.0.0 (latest) — 2014-09-19

## README

# restify-joi-mw

## Routes

``` js
server.put('/account/:id',
  r.account.validateParams('id'),
  r.account.validate('password'),
  r.account.update);

server.post('/account',
  r.account.validate('email', 'password'),
  r.account.create);
```

## Controller

``` js
var validate = require('restify-joi-mw');

var account = {};

account.validate = validate.mw();
account.validateParams = validate.mw('params');
```

## Schema

```
'use strict';

var Joi = require('joi');

module.exports = {
  email: Joi.string().email().required(),
  password: Joi.string().regex(/[a-zA-Z0-9]{3,30}/).required(),
  id: Joi.string().regex(/^[0-9a-fA-F]{24}$/).required()
};
```

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