Skip to content
This repository has been archived by the owner on Dec 25, 2017. It is now read-only.

Multiple validators cause issues #185

Closed
nblackburn opened this issue Apr 5, 2016 · 3 comments
Closed

Multiple validators cause issues #185

nblackburn opened this issue Apr 5, 2016 · 3 comments

Comments

@nblackburn
Copy link
Contributor

Just updated to version 2.0.0 and noticed if you have multiple validators on the same page, it seems to cause the following issues...

  • Tags are not rendered in certain places.
  • v-model bind incorrectly.
    <modal v-ref:createModal title="Create project">
        <validator name="createForm">
            <form class="uk-form uk-form-stacked" @submit.prevent="createProject">
                <div class="uk-form-row">
                    <label class="uk-form-label" for="createName">Name</label>
                    <div class="uk-form-controls">
                        <input class="uk-width-1-1" type="text" v-model="createName" v-validate:createName="{required: true}">
                    </div>
                </div>
                <div class="uk-form-row">
                    <label class="uk-form-label" for="createDescription">Description</label>
                    <div class="uk-form-controls">
                        <textarea class="uk-width-1-1" v-model="createDescription" v-validate:createDescription="{required: true}"></textarea>
                    </div>
                </div>
                <div class="uk-form-row">
                    <button class="uk-button uk-button-primary" type="submit" :disabled="$createForm.invalid">Create</button>
                </div>
            </form>
        </validator>
    </modal>
    <modal v-ref:editModal title="Edit project">
        <validator name="editForm">
            <form class="uk-form uk-form-stacked" @submit.prevent="updateProject">
                <div class="uk-form-row">
                    <label class="uk-form-label" for="editName">Name</label>
                    <div class="uk-form-controls">
                        <input class="uk-width-1-1" type="text" v-model="editName" :value="project.name" v-validate:editName="{required: true}">
                    </div>
                </div>
                <div class="uk-form-row">
                    <label class="uk-form-label" for="editDescription">Description</label>
                    <div class="uk-form-controls">
                        <textarea class="uk-width-1-1" v-model="editDescription" :value="project.description" v-validate:editDescription="{required: true}"></textarea>
                    </div>
                </div>
                <div class="uk-form-row">
                    <button class="uk-button uk-button-primary" type="submit" :disabled="$editForm.invalid">Save</button>
                </div>
            </form>
        </validator>
    </modal>

modal.vue

@nblackburn
Copy link
Contributor Author

Seems as though it could be related to #177.

@kazupon
Copy link
Owner

kazupon commented Apr 5, 2016

@nblackburn Yes, I'm fixing now.

@nblackburn
Copy link
Contributor Author

@kazupon Great, thanks for the prompt response.

@kazupon kazupon closed this as completed in 21296d5 Apr 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants