# @t2ee/validation

> validation

Latest version **1.0.2** (published 2017-08-03) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @t2ee/validation
pnpm add @t2ee/validation
yarn add @t2ee/validation
bun add @t2ee/validation
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-08-03 |
| First published | 2017-08-03 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Qiaosen Huang |
| Maintainers | t2ee |
| Keywords | t2ee, validation |

## Links

- npm: https://www.npmjs.com/package/@t2ee/validation
- Repository: https://github.com/t2ee/validation
- Homepage: https://github.com/t2ee/validation#readme
- Issues: https://github.com/t2ee/validation/issues
- npm.io page: https://npm.io/package/@t2ee/validation

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2017-08-03

## README

<p align="center">
    <a href="http://t2ee.org">
        <img width="200" src="http://t2ee.org/img/logos/t2ee.png">
    </a>
</p>
<p align="center">
    <a href="http://validation.t2ee.org">
        <img width="200" src="http://t2ee.org/img/logos/validation.png">
    </a>
</p>

<p align="center">
    <a href="https://travis-ci.org/t2ee/validation">
        <img src="https://img.shields.io/travis/t2ee/validation/master.svg?style=flat-square">
    </a>
    <a href="https://coveralls.io/r/t2ee/validation?branch=master">
        <img src="https://img.shields.io/coveralls/t2ee/validation/master.svg?style=flat-square">
    </a>
</p>

# Introducation

This library fully uses the advantages of decorators, make it smooth to write validation rules.

For detailed introductions and examples, please visit [validation.t2ee.org](http://validation.t2ee.org).


# Installation

`npm i reflect-metadata @t2ee/core @t2ee/validation -S`

# Example usage with [@t2ee/vader](https://github.com/t2ee/vader)

```typescript
class Message {
    @NotNull
    @Min(4)
    message: string;
}

@Path('/')
@Component
class Controller {

    @POST
    @Path('/say')
    say(@Valid @Body message: Message) {
        // message should be at least 4 characters long
    }
}
```

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