Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alekseypleshkov/vue-form-send

A Vue.js directive for sending data from form and primitive validation
https://github.com/alekseypleshkov/vue-form-send

nuxtjs vue-directive vue-form vuejs vuejs2

Last synced: about 1 month ago
JSON representation

A Vue.js directive for sending data from form and primitive validation

Awesome Lists containing this project

README

        

# Vue Form Send

A Vue.js directive for sending data from form and primitive validation inputs

## Installation

```js
npm i --save-dev vue-form-send
```

```js
import VueFormSend from 'vue-form-send'

Vue.use(VueFormSend)
```

#### SSR (Nuxt.js)

```js
import VueFormSend from 'vue-form-send/dist/ssr.index'

Vue.use(VueFormSend)
```

## Usage

```html







Send

```

## Directive options

#### Form

| Option | Value type | Description |
| ------ | ------ | ------ |
| pressButton | Function | Call function after click to form button |
| success | Function | Call function after success send data |
| fail | Function | Call function is fail validation or send data |
| credentials | Boolean | Use credentials
| auth | Function -> {type: String, data: String} | User auth. Return object with auth type and data string format username:password

#### Element

| Option | Value type | Description |
| ------ | ------ | ------ |
| length | Integer | Check length value of element |
| replace | Boolean | Replacing symbols from text value |
| clear | Boolean | Clear value after success send data |
| timeoutError | Integer | Timeout for remove error class |
| changeValidation | Boolean | Real-time validaton if change input value |
| type | String | Types of verification (length of checked). Default - length. |