I am currently attempting to validate whether my variable is empty. Despite reviewing my code, I am facing issues with its functionality.
My current version of vue.js is 2.5.13
Below you can find the snippet of my code:
<template>
<div v-if="Object.keys(this.myValues).length === 0">
This field is empty
</div>
<div v-else>
All good
</div>
</template>
<script>
export default {
data: function() {
return {
myValues: new Object()
};
}
};
</script>