ferdinandfrank / vue-forms

Set of Vue.js components to submit forms with ajax.
https://ferdinandfrank.github.io/vue-forms/
MIT License
5 stars 0 forks source link

valid state won't change when it suppose to #11

Closed m3di closed 6 years ago

m3di commented 6 years ago

he

thank you for this awesome package you just made my day. just a little problem. when i submit the form and server returns validation errors the submit button won't get disable until i resubmit the form again (with no change) and then the button get disable and never enable again.

this is my form

        <ajax-form method="post" action="/test" :clear="true">
            <form-input name="name" label="name"></form-input>
            <form-select name="gender" label="gender" :value="'m'">
                <option value="m">Male</option>
                <option value="f">Female</option>
            </form-select>

            <button type="submit" class="btn btn-primary">submit</button>
        </ajax-form>

and this is my controller code:

        $this->validate($request, [
            'name' => 'required|min:10'
        ]);

just submit the form twice (don't change anything) and the button gets disable and never enable again.

thank you for your awesome package.

ferdinandfrank commented 6 years ago

Thanks for your feedback! This was just a little issue on the code. Should be fixed in v1.4.1 😃