Input form not working - updating bootstrap-vue version

Viewed 939

I am using a form and I have a numeric field in one of the inputs, however when opening the modal of the form when editing a line, the error below is displayed:

[Vue warn]: Invalid prop: type check failed for prop "value". Expected String with value "1", got Number with value 1.

My code:

    <b-col md="6" sm="12">
        <b-form-group label="Code:" label-for="institution-code" label-size="sm" class="mt-0 mb-0">
            <b-form-input id="institution-code"
                label-for="institution-code"
                size="sm"
                type="number"
                v-model="institution.code" required
                placeholder="Insert code..." />
        </b-form-group>
    </b-col>
</template>

export default {
data: function() {
    return {
        institution: {},

Old Version: "bootstrap-vue": "2.0.0-rc.11",

New Version: "bootstrap-vue": "2.0.0-rc.12",

What's wrong with my code?

2 Answers

Change the v-model.number to v-model="your property"

I needed update to version to working:

New Version: "bootstrap-vue": "2.0.0-rc.13",

    <b-col md="6" sm="12">
        <b-form-group label="Code:" label-for="institution-code" label-size="sm" class="mt-0 mb-0">
            <b-form-input id="institution-code"
                label-for="institution-code"
                size="sm"
                type="number"
                v-model.number="institution.code" required
                placeholder="Insert code..." />
        </b-form-group>
    </b-col>
</template>

export default {
data: function() {
    return {
        institution: {},
Related