# validator-form

> jQuery validator for form

Latest version **0.1.11** (published 2016-07-10) · ISC license · 0 weekly downloads

## Install

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

## 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.1.11 |
| Published | 2016-07-10 |
| First published | 2016-07-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Igor Sorokopud |
| Maintainers | igorsorokopud |
| Keywords | jquery, validator, form |

## Links

- npm: https://www.npmjs.com/package/validator-form
- Repository: https://github.com/IgorSorokopud/validator
- Homepage: https://github.com/IgorSorokopud/validator#readme
- Issues: https://github.com/IgorSorokopud/validator/issues
- npm.io page: https://npm.io/package/validator-form

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.11 (latest) — 2016-07-10
- 0.1.10 — 2016-07-08
- 0.1.9 — 2016-07-08
- 0.1.8 — 2016-07-08
- 0.1.7 — 2016-07-06
- 0.0.7 — 2016-07-06
- 0.0.6 — 2016-07-06
- 0.0.5 — 2016-07-03
- 0.0.4 — 2016-07-03
- 0.0.3 — 2016-07-01
- 0.0.2 — 2016-07-01
- 0.0.1 — 2016-07-01

## README

# validator for form

Use
===
````
$('element').validator(); /* default */

$('element').validator({
    'numberRegexp': /^[1-9][0-9]*/  /* add regexp */
    'emailRegexp':
    'phoneRegexp':
    'nameRegexp':
    'passwordRegexp':
    'dateRegexp':
    'creditCarRegexp':

    'numberTextError': 'invalid number',
    'emailTextError': 'invalid email',
    'phoneTextError': 'invalid phone',
    'nameTextError': 'invalid name',          /* add text error */
    'passwordTextError': 'invalid password',
    'dateTextError': 'invalid date',
    'creditCarTextError': 'Invalid credit cart',

    'buttonSubmit': '.classButton', /* class button which disabled if error */
    'callback': 'handler'  /* if validation true, run function and return 'this', 'type' */
});

function handler(self, type) {
  self /* <input type="number" data-error="number"> */
  type /* "number" */
}
````

HTML
=========
````

<form>
    <input type="number" data-error="number">
    <input type="text" data-error="email">
    <input type="number" data-error="phone">
    <input type="text" data-error="name">
    <input type="number" data-error="password">
    <input type="number" data-error="date">
    <input type="number" data-error="creditCar">
</form>

````

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