# joi-extension-string-valid-from-refs

> Adds within validation to enable you to validate string value from composing different joi references

Latest version **1.0.1** (published 2016-12-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install joi-extension-string-valid-from-refs
pnpm add joi-extension-string-valid-from-refs
yarn add joi-extension-string-valid-from-refs
bun add joi-extension-string-valid-from-refs
```

## 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 | 1.0.1 |
| Published | 2016-12-23 |
| First published | 2016-12-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+14 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Youhana Hana |
| Maintainers | b2mdevelopment |
| Keywords | joi, validation, extension, string, refs, references, joining |

## Links

- npm: https://www.npmjs.com/package/joi-extension-string-valid-from-refs
- Repository: https://github.com/B2MSolutions/joi-extension-string-validFromRefs
- Homepage: https://github.com/B2MSolutions/joi-extension-string-validFromRefs#readme
- Issues: https://github.com/B2MSolutions/joi-extension-string-validFromRefs/issues
- npm.io page: https://npm.io/package/joi-extension-string-valid-from-refs

## Dependencies (3)

- [joi](https://npm.io/package/joi.md) 9.0.4
- [hoek](https://npm.io/package/hoek.md) 4.1.0
- [lodash](https://npm.io/package/lodash.md) 4.17.2

## 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

- 1.0.1 (latest) — 2016-12-23
- 1.0.0 — 2016-12-22

## README

# joi-extension-string-validFromRefs
An extension to Joi to enable checking that a string is composed from a number of refs.

In the below example we are confirming that `fullName` is composed from `firstName` and `lastName`

```javascript
var Joi = require('joi').extend(require('joi-extension-string-valid-from-refs'));

var schema = Joi.object({
  firstName: Joi.string().required(),
  lastName: Joi.string().required(),
  fullName: Joi.string().required().validFromRefs(['lastName', 'firstName'], ', ')
});

var input = {
  fistName: 'John',
  lastName: 'Smith',
  fullName: 'Smith, John'
};

Joi.assert(input, schema)
```

---
_Source: https://npm.io/package/joi-extension-string-valid-from-refs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
