# smart-model-validator

> A validator library where you will set validator rules and send model or array to validate

Latest version **0.0.5** (published 2015-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install smart-model-validator
pnpm add smart-model-validator
yarn add smart-model-validator
bun add smart-model-validator
```

Provides the command `smart-model-validator`.

## 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.5 |
| Published | 2015-12-08 |
| First published | 2015-12-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Md Eftakahirul Islam |
| Maintainers | eftakhairul |
| Keywords | validator, file, node-model-validator, smart-model-validator, model-validator |

## Links

- npm: https://www.npmjs.com/package/smart-model-validator
- Repository: https://github.com/eftakhairul/smart-model-validator
- Issues: https://github.com/eftakhairul/smart-model-validator/issues
- npm.io page: https://npm.io/package/smart-model-validator

## Dependencies (1)

- [validator](https://npm.io/package/validator.md) ^4.3.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.0.5 (latest) — 2015-12-08
- 0.0.4 — 2015-12-08
- 0.0.3 — 2015-12-05
- 0.0.2 — 2015-12-05
- 0.0.1 — 2015-12-05

## README

# smart-model-validator
[![Build Status](https://travis-ci.org/eftakhairul/node-model-validator.svg?branch=master)](https://travis-ci.org/eftakhairul/node-model-validator) [![GitHub issues](https://img.shields.io/github/issues/eftakhairul/smart-model-validator.svg)](https://github.com/eftakhairul/smart-model-validator/issues)  [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/eftakhairul/smart-model-validator/master/LICENSE)

It validate model as object against specific rules. It's has following features

-- Custom error message
-- Accept custom validation

### Version
0.0.5


### Installation
Install package globally:

```sh
$ npm install -g smart-model-validator
```

Or inside project:

```sh
$ npm install smart-model-validator --save
```


## Examples
```js
//require library
var ModelValidator = require('smart-model-validator');


var modelValidator = new ModelValidator();
modelValidator.setRules({name:{require:true, type: 'string'}});
console.log(modelValidator.isValid({name: 'Mr. Smith'}));   //true
```

## Supported Validation
    - String
    - Int
    - Base64
    - Boolean
    - Date
    - Float
    - IP
    - ISBN
    - SO8601
    - JSON
    - UUID

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