# nast-form

> Library for manage forms.

Latest version **1.0.5** (published 2021-08-05) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2021-08-05 |
| First published | 2021-07-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 10.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alexey |
| Maintainers | alexey-renova |
| Keywords | vue, form, inputs |

## Links

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

## Dependencies (2)

- [nast](https://npm.io/package/nast.md) ^1.0.*
- [lodash](https://npm.io/package/lodash.md) ^4.17.*

## 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.0.5 (latest) — 2021-08-05
- 1.0.4 — 2021-07-08
- 1.0.3 — 2021-07-07
- 1.0.2 — 2021-07-07
- 1.0.1 — 2021-07-07

## README

# nast-form

## Installation
```
npm i -S nast-form
```

## Prepare
```
import Vue from 'vue'
import App from './App'
import NastForm from 'nast-form'

Vue.use(NastForm.vue(), {})

new Vue({
  render: (h) => h(App),
}).$mount('#app')
```

## Basic usage
```
&lt;div id=&quot;app&quot;&gt;
&lt;form @submit.prevent=&quot;submit&quot;&gt;
  {{ $form.errors() }}
  &lt;div&gt;&lt;input title=&quot;Name&quot; :v-bind=&quot;$form.input(&#39;name&#39;)&quot; @input=&quot;($event) =&gt; change($event, &#39;name&#39;)&quot; /&gt;&lt;/div&gt;
  &lt;div&gt;&lt;input title=&quot;Email&quot; :v-bind=&quot;$form.input(&#39;email&#39;)&quot; @input=&quot;($event) =&gt; change($event, &#39;email&#39;)&quot; /&gt;&lt;/div&gt;
  &lt;div&gt;&lt;button type=&quot;submit&quot;&gt;Submit&lt;/button&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;

export default {
  name: 'App',
  mounted() {
    this.$form.init({
      name: '',
      email: '',
    })
    this.$form.rules({
      name: [ 'required', ],
      email: [ 'email', ],
    })
  },
  methods: {
    change(event, name) {
      this.$form.set(name, event.target.value)
    },
    submit() {
      if (this.$form.check()) {
        console.log(this.$form.get())
      }
    },
  },
}
```

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