I'm working with BootstrapVue.
I have two b-form-inputs the first one will be autofilled from a query string. Now I need to write the ID in my other b-form-input and want to check if the ID in my json file (based on my Name) is equal to my inputed ID.
Than my validDataAdded: function () should return that button will be enabled - this is my problem, i actually don't know how to solve that..
Thank You!
my template:
<template>
<b-card class="mt-5 col-md-6">
<div class="mt-2">Name</div>
<b-form-input :disabled="true" v-model="this.Name" :value="this.Name"></b-form-input>
<div class="mt-4">ID</div>
<b-form-input type="number"></b-form-input>
<b-button :disabled="!validDataAdded">Login</b-button>
</b-card>
</template>
my script:
<script>
export default {
name: "test",
data() {
return {
data: [
{
"Name": "Harry",
"ID": "1234",
},
{
"Name": "Ron",
"ID": "4321",
},
{
"Name": "Snape",
"ID": "1973",
}
]
};
},
methods: {
validDataAdded: function () {
return //NEED CODE HERE
},
},
};
</script>
IDwith theIDof myName.