Try:
<input :required="test ? true : false">
Update: It has changed in Vue 3, see this answer https://stackoverflow.com/a/64598898
More Related Contents:
- Vue.js dynamic images not working
- Vuejs Error: The client-side rendered virtual DOM tree is not matching server-rendered
- Communication between sibling components in Vue.js 2.0
- VueJS: why is “this” undefined?
- Vuex state on page refresh
- Vuejs and Vue.set(), update array
- [Vue warn]: Property or method is not defined on the instance but referenced during render
- How to watch store values from vuex?
- NavigationDuplicated Navigating to current location (“/search”) is not allowed
- How to listen for ‘props’ changes
- Accessing Vuex state when defining Vue-Router routes
- Vue JS: Difference of data() { return {} } vs data:() => ({ })
- Vuejs typescript this.$refs..value does not exist
- Vue.js: Conditional class style binding
- Is there any way to ‘watch’ for localstorage in Vuejs?
- how to fix ‘Access to XMLHttpRequest has been blocked by CORS policy’ Redirect is not allowed for a preflight request only one route
- VueJS/Typescript – Cannot find module ‘./components/Navigation’ or its corresponding type declarations
- Vue v-on:click does not work on component
- Methods vs Computed in Vue
- Passing props with programmatic navigation Vue.js
- How to set a component non-reactive data in Vue 2?
- Vue.js – update router view
- How to use Vuetify tabs with vue-router
- Force download GET request using axios
- Importing javascript file for use within vue component
- How to limit iteration of elements in `v-for`
- Detect Back Button in Navigation Guards of Vue-Router
- When should I use Vuex?
- Vue.js – Add class to clicked button
- How to pass an object as props with vue router?