# dingle-validator

> Dingle Parameter Validation

Latest version **0.2.0** (published 2015-06-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install dingle-validator
pnpm add dingle-validator
yarn add dingle-validator
bun add dingle-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.2.0 |
| Published | 2015-06-01 |
| First published | 2015-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | Vmlweb |
| Maintainers | vmlweb |
| Keywords | dingle, framework, module, api, layout, endpoint, backend, scalable, scale, maintain, maintainable, manager, export, code, generation, generator, client, validation, validator, validate, parameter, argument, option |

## Links

- npm: https://www.npmjs.com/package/dingle-validator
- Repository: https://github.com/Vmlweb/Dingle-Validator
- Homepage: https://github.com/Vmlweb/Dingle-Validator#readme
- Issues: https://github.com/Vmlweb/Dingle-Validator/issues
- npm.io page: https://npm.io/package/dingle-validator

## Dependencies (1)

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

## Alternatives

- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads

## Recent versions

- 0.2.0 (latest) — 2015-06-01
- 0.1.1 — 2015-05-28
- 0.1.0 — 2015-05-28
- 0.0.4 — 2015-05-28
- 0.0.3 — 2015-05-28
- 0.0.2 — 2015-05-28
- 0.0.1 — 2015-05-28

## README

# Dingle Validator
[Dingle](https://github.com/Vmlweb/Dingle) Parameter Validation

## Installation

```bash
$ npm install --save dingle-validator
```

## Usage

Simply require the dingle validator module and specify a data type:

```javascript
exports.params.email = {
	description: 'Email for the user being registered',
	required: true,
	validator: require('dingle-validator').email
}
```

## Custom Errors

To return a custom error you must pass it into the function like so:

```javascript
exports.params.email = {
	description: 'Email for the user being registered',
	required: true,
	validator: function(object){
		return require('dingle-validator').email(object, 'You must enter a valid email address!');	
	}
}
```

## Data Types

You can use any of the following data types from this module:

- string
- boolean
- float
- integer
- date *(Returns a date object)*
- file *(Returns a multer object)*
- json *(Returns an object from JSON.parse)*
- email
- ip
- url
- domain
- base64
- color *(Hexidecimal color)*
- hex *(Hexidecimal number)*
- isbn
- isin
- uuid
- mongo *(Mongo object id)*
- card *(Credit or debit card)*

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