--- pageClass: rule-details sidebarDepth: 0 title: vue/valid-v-model description: enforce valid `v-model` directives since: v3.11.0 --- # vue/valid-v-model > enforce valid `v-model` directives - :gear: This rule is included in the following preset configs: - `*.configs["flat/essential"]` - `*.configs["flat/vue2-essential"]` - `*.configs["flat/strongly-recommended"]` - `*.configs["flat/vue2-strongly-recommended"]` - `*.configs["flat/recommended"]` - `*.configs["flat/vue2-recommended"]` - `"plugin:vue/essential"` - `"plugin:vue/vue2-essential"` - `"plugin:vue/strongly-recommended"` - `"plugin:vue/vue2-strongly-recommended"` - `"plugin:vue/recommended"` - `"plugin:vue/vue2-recommended"` This rule checks whether every `v-model` directive is valid. ## :book: Rule Details This rule reports `v-model` directives in the following cases: - The directive used on HTMLElement has an argument. E.g. `` - The directive used on HTMLElement has modifiers which are not supported. E.g. `` - The directive does not have that attribute value. E.g. `` - The directive does not have the attribute value which is valid as LHS. E.g. ``, `` - The directive has potential null object property access. E.g. `` - The directive is on unsupported elements. E.g. `
` - The directive is on `` elements which their types are `file`. E.g. `` - The directive's reference is iteration variables. E.g. `
` ```vue