# @clocklimited/validity-email

> Validity style validator to ensure that a property is a valid email address.

Latest version **1.1.0** (published 2022-05-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install @clocklimited/validity-email
pnpm add @clocklimited/validity-email
yarn add @clocklimited/validity-email
bun add @clocklimited/validity-email
```

## 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.1.0 |
| Published | 2022-05-31 |
| First published | 2022-04-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Paul Serby |
| Maintainers | steepnicki, wesmoore, benparnell, jack828, asheboy, microadam, ndumato |

## Links

- npm: https://www.npmjs.com/package/@clocklimited/validity-email
- Repository: https://github.com/clocklimited/validity-email
- Homepage: https://github.com/clocklimited/validity-email#readme
- Issues: https://github.com/clocklimited/validity-email/issues
- npm.io page: https://npm.io/package/@clocklimited/validity-email

## Dependencies (2)

- [email-validator](https://npm.io/package/email-validator.md) ^2.0.4
- [@clocklimited/validity](https://npm.io/package/@clocklimited/validity.md) ^1.1.3

## Recent versions

- 1.1.0 (latest) — 2022-05-31
- 1.0.2 — 2022-04-04
- 1.0.1 — 2022-04-04

## README

# validity-email

Validity style validator to ensure that a property is a valid email address.

As part of the modularisation of [validity](https://github.com/serby/validity), this replaces the built-in `validity.email`.

[![build status](https://secure.travis-ci.org/serby/validity-email.svg)](http://travis-ci.org/serby/validity-email)
[![dependency status](https://david-dm.org/serby/validity-email.svg)](https://david-dm.org/serby/validity-email)

## Installation

```
npm install --save @clocklimited/validity-email
```

## Usage

```js

const schemata = require('schemata')
  , email = require('@clocklimited/validity-email')
  , schema = schemata(
    { emailAddress:
      { validators: [ email ] }
    })
  , schemaWithCustomMessage = schemata(
    { emailAddress:
      { validators: [ email.setFailureMessage('#{name} not valid') ] }
    })


schema.validate({}, function (error, errors) {
  console.log(error, errors)
  // null, 'Email Address must be a valid email address'
})

schemaWithCustomMessage.validate({}, function (error, errors) {
  console.log(error, errors)
  // null, 'Email Address not valid'
})

```

## Credits
[Paul Serby](https://github.com/serby/)

## License

ISC

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