# validator-extended

> String validation and sanitization based on validator.js

Latest version **4.2.1** (published 2015-11-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install validator-extended
pnpm add validator-extended
yarn add validator-extended
bun add validator-extended
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.2.1 |
| Published | 2015-11-05 |
| First published | 2014-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Vadorequest |
| Maintainers | vadorequest |
| Keywords | validator, validation, validate, sanitization, sanitize, sanitisation, sanitise, assert, extend, extended |

## Links

- npm: https://www.npmjs.com/package/validator-extended
- Repository: https://bitbucket.org/Ayolan/validator-extended/
- Issues: https://bitbucket.org/Ayolan/validator-extended/issues
- npm.io page: https://npm.io/package/validator-extended

## Dependencies (1)

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

## Alternatives

- [@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
- [@oridune/validator](https://npm.io/package/@oridune/validator.md) — 16 weekly downloads

## Recent versions

- 4.2.1 (latest) — 2015-11-05
- 3.19.1 — 2014-10-11
- 3.12.2 — 2014-05-18
- 3.12.1 — 2014-05-17
- 3.12.0 — 2014-05-17
- 1.0.1 — 2014-04-28
- 1.1.0 — 2014-01-18
- 1.0.0 — 2014-01-15

## README

Validator-Extended
=======================

###validator.js###
* **Based on** [validator.js](https://github.com/chriso/validator.js)
* _Current version based on:_ _**4.2.1**_

```javascript
var validator = require('validatorExtended');
```

###node-validator-extended###
The main purpose of this repo is to add redundancy functions that won't be added in the validator.js repository.
These functions could be useful for some people.

####Validators####
The following functions have been added to the original Validator:

* **notNull(str): boolean** - Check if string is not null.
* **notEmpty(str): boolean** - Check if string is not empty.
* **isEmpty(str): boolean** - Check if string is empty.

#### Tests
We now use mocha to perform tests.

`npm install mocha -g`

To run the test, just use **mocha**, *assuming you're on the directory*:
`mocha`

```shell
C:\wamp\www\Ayolan\Validator-extended>mocha
    ValidatorExtended
        #notNull()
          V should return true when a value is present
          V should return false when there is no value
        #notEmpty()
          V should return true when a value is present
          V should return false when there is no value
        #isEmpty()
          V should return true when a value is present
          V should return false when there is no value

```

#### The library isn't up-to-date?
The official `validator` library updates itself quite often, so I am most of the time *out-of-date*.
In order to provide the most recent version I have decided to write in the `package.json` the following dependency: `"validator": "latest"`.
So you can just do `npm update validator-extended` and it will install the latest `validator` version in `node_modules/validator`.

*But it won't work for the browser version, which requires a manual update from me and a new publish on **npm**. In this case just create an issue to ask for the latest version! I'll do it ASAP.*

####Licence####
https://github.com/Ayolan/node-validator-extended/blob/master/LICENSE

*You can obviously fork and add other functions. Please just check if they should not belong to the **[validator.js](https://github.com/chriso/validator.js)** repository before! :)*

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