# validity-or-validator

> validate that one or both given validators pass

Latest version **0.0.4** (published 2014-12-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install validity-or-validator
pnpm add validity-or-validator
yarn add validity-or-validator
bun add validity-or-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.4 |
| Published | 2014-12-03 |
| First published | 2014-11-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ben Parnell |
| Maintainers | benparnell |

## Links

- npm: https://www.npmjs.com/package/validity-or-validator
- Repository: git@github.com:benjaminparnell/validity-or-validator
- Homepage: https://github.com/benjaminparnell/validity-or-validator
- Issues: https://github.com/benjaminparnell/validity-or-validator/issues
- npm.io page: https://npm.io/package/validity-or-validator

## Dependencies (1)

- [async](https://npm.io/package/async.md) ^0.9.0

## Recent versions

- 0.0.4 (latest) — 2014-12-03
- 0.0.3 — 2014-11-18
- 0.0.2 — 2014-11-14

## README

# validity-or-validator

Validate that one or both of two validators pass for the current property

## Installation

```
npm install validity-or-validator --save
```

## Usage

Below is a simple example for usage with schemata and save:

``` js
var validity = require('validity')
  , schemata = require('schemata')
  , save = require('save')
  , collection = save('article')
  , validateMailTo = require('validity-mailto-link')
  , or = require('validity-or-validator')

var schema = schemata(
    { type:
      { type: String
      }
    , callToActionLink:
      { type: String
      , validators: { all: [ or(validity.url, validateMailTo()) ] }
      }
    })

```

## Credits
[Ben Parnell](https://github.com/benjaminparnell/)

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