# validifyjs

> Simple validation library in JS

Latest version **1.0.0** (published 2016-12-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install validifyjs
pnpm add validifyjs
yarn add validifyjs
bun add validifyjs
```

## 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.0 |
| Published | 2016-12-14 |
| First published | 2016-12-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | shivkanthb |
| Maintainers | bats |
| Keywords | validation, validate |

## Links

- npm: https://www.npmjs.com/package/validifyjs
- Repository: https://github.com/shivkanthb/Validifyjs
- Homepage: https://github.com/shivkanthb/Validifyjs#readme
- Issues: https://github.com/shivkanthb/Validifyjs/issues
- npm.io page: https://npm.io/package/validifyjs

## 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.0 (latest) — 2016-12-14
- 0.1.0 — 2016-12-13

## README

Validify JS
=========

### Generic validation library in javascript
#### Can be used as both an npm module and also on the browser

## Installation
### Node 
```
npm install validifyjs
```

### Browser 
```
<script src=“validify.js”></script>
```

## Usage
### Browser
Add html attribute "data-validify" to the element to be validated.
The value of the attribute would decide what validation is to be done.

####Example:
<input type="text" data-validify="email" />
This ensures email validation on this input field, by calling isEmail when submitting the form by calling validateForm(formElements).
Similary data-validify="html" maps to isHtml() method and so on.
Individual methods can also be called, and the regex patterns can also be overridden.

####Override Regex Pattern:
isEmail("hariv2992@gmail.com") or isEmail("hariv2992@gmail.com", /(<([^>]+)>)/ig) (Although why use this particular regex is beyond me :P)

### npm module
```
var validify = require('validifyjs')
```

Individual methods and validateForm(formElements) can be called for validation, as mentioned in the case for the browser.


Other methods:
* isEmpty()
* isZipCode() (only for codes in the US)
* isMDDYYYYDate()
* isDDMMYYYYDate()
* is24HourTime()
* is12HourTime()
* isHtml()
* isHexColor()
* isUrl()
* isEmail()
* isNumber()
* isInteger()
* isPositive()
* isNegative()
* isIpv4()
* isIPv6()

## Tests
```
npm test
```

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style.
Add unit tests for any new or changed functionality. Lint and test your code.
## Release History
* 0.1.0 Initial release

## Developers
* Hari
* Shivkanth

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