-
Installation and Ussage:
- npm install git+https://github.com/Yismen/dainsys-form.git --save-dev
- move it to your vendor folder:
- cp -r ./node_modules/dainsys-form/ ./resources/assets/js/vendor/
- import it in your component 'path/vendor/dainsys-form'
- it is recomended to install 'vue-container' npm install --save vue-container for depedencies management
-
Bind the model by adding the name and v-model attributes to your form fields:
- name="card"
- v-model="form.fields.card"
-
Working with Files:
- Add the following directive to you vue form: 1.1 enctype="multipart/form-data" 1.2 @change="form.loadFiles($event.target.name, $event.target.files)"
-
To Display Errors, add the following span:
- Add a span, with class="text-danger"
- Add the following directive: v-if="form.error.has('name')" v-text="form.error.get('name')"
-
To remove the errors while the field changes, add the following directive to you form:
- @keydown="form.error.clear($event.target.name)" or @change="form.error.clear($event.target.name)"
-
Notifications
You must be signed in to change notification settings - Fork 0
Yismen/dainsys-form
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Packages 0
No packages published