Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/alekseypleshkov/vue-form-send
- Owner: AlekseyPleshkov
- Created: 2017-12-08T19:52:39.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-03T16:02:39.000Z (almost 2 years ago)
- Last Synced: 2024-10-01T15:24:20.669Z (about 1 month ago)
- Topics: nuxtjs, vue-directive, vue-form, vuejs, vuejs2
- Language: JavaScript
- Homepage:
- Size: 612 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
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. |