Skip to content

Yismen/dainsys-form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jorge.form

  • Installation and Ussage:

    1. npm install git+https://github.com/Yismen/dainsys-form.git --save-dev
    2. move it to your vendor folder:
    • cp -r ./node_modules/dainsys-form/ ./resources/assets/js/vendor/
    1. 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:

    1. name="card"
    2. v-model="form.fields.card"
  • Working with Files:

    1. 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:

    1. Add a span, with class="text-danger"
    2. 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)"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published