# octaform-additional

> Octaform Additional is a package that provides you a pre-set of validation. To know more about the Octaform Validation Core please check out the official documentation in https://github.com/octaform/octaform

Latest version **1.2.0** (published 2020-03-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install octaform-additional
pnpm add octaform-additional
yarn add octaform-additional
bun add octaform-additional
```

## 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.2.0 |
| Published | 2020-03-30 |
| First published | 2018-11-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 103.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Octaform |
| Maintainers | chrisgfortes |
| Keywords | form, forms, formjs, form validation, validation, validations, react, react-native, angular, vue, javascript, vanilla, additional, additional validations, octaform, octaform-additional, octaform validations |

## Links

- npm: https://www.npmjs.com/package/octaform-additional
- Repository: https://github.com/octaform/octaform-additional
- Homepage: https://github.com/octaform/octaform#readme
- Issues: https://github.com/octaform/octaform-additional/issues
- npm.io page: https://npm.io/package/octaform-additional

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

- 1.2.0 (latest) — 2020-03-30
- 1.1.1 — 2019-05-13
- 1.1.0 — 2019-04-02
- 1.0.14 — 2019-03-26
- 1.0.13 — 2018-11-21
- 1.0.12 — 2018-11-21
- 1.0.11 — 2018-11-21
- 1.0.10 — 2018-11-21
- 1.0.9 — 2018-11-21
- 1.0.6 — 2018-11-21
- 1.0.4 — 2018-11-21
- 1.0.3 — 2018-11-20
- 1.0.2 — 2018-11-20
- 1.0.1 — 2018-11-20
- 1.0.0 — 2018-11-20

## README

<h1 align="center">
  <div align="center">
    <img src="https://avatars2.githubusercontent.com/u/37938941?s=400&u=b7a61cbf6b9686cb78d50258213b256159dbb7af&v=4" height="200" width="200"/>
  </div>
  <div align="center">
    Octaform <br />Additional validations
  </div>
</h1>

**Octaform Additional** is a package that provides you a pre-set of validation. To know more about the Octaform Validation Core please check out the official documentation in [https://github.com/octaform/octaform](https://github.com/octaform/octaform)

## Getting Started

Install using `yarn`:
```
yarn add octaform-additional
```

Or via `npm`:
```
npm install octaform-additional --save
```

After installed import the `octaform-additional` together with the `Octaform` and start to use:

```js
import Octaform from 'octaform';
import validation from 'octaform-additional';

// Add the validations object into array
Octaform.validator.add([
  validation.email,
  validation.extension
])

```

## Available validations

Validations       | Description                                           | How to use
------------------|-------------------------------------------------------|--------------------
date              | Given a date validate the format `( / | - | . |  )`   | `date: MM/DD/YYYY | M/D/YY`
email             | Only valid emails                                     | `email: true`
equalTo           | Requires the field to have the same value as another  | `equalTo: <HTML_Attribute or ID>`
extension         | Only valid file extensions, e.g. `png`, `jpg`         | `extension: ['png', 'jpg']`
letter            | Only letters is accepted `[A-Z]`                      | `letter: true`
maxlength         | Define maxlength from text                            | `maxlength: 12`
maxsize `(bytes)` | Define maximum upload size                            | `maxsize: 50000`
minchecked        | Define minimum of checked checkboxes                  | `minchecked: 2`
minlength         | Define minlength from text                            | `minlength: 3`
number            | Only numbers is accepted `[0-9]`                      | `number: true`
pattern           | Requires a value in regex format                      | `pattern: ^[0-9]+$`
range             | Require a given value range                           | `range: [5, 8]`
required          | Make that the field be required                       | `required: true`
url               | Require a valid url                                   | `url: true`
valueEquals       | Require a value to be the same as the predefined      | `valueEquals: 'Dog'`
valueNotEquals    | Define one value that shouldn't be equal              | `valueNotEquals: 'Dog'`

## Demo
Take a look at the validations in the demo page: https://octaform.github.io

## Changelog

[Check out releases](https://github.com/octaform/octaform-additional/releases)

## License

[The MIT License (MIT)](/LICENSE)

Copyright (c) 2020 Christian Fortes

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