Skip to content

Commit

Permalink
fix(v-checkbox): fix checkbox validation
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitano committed May 10, 2022
1 parent f83eec6 commit 412820a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/checkbox/src/VCheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ const props = defineProps({
type: String,
default: '',
},
rules: {
type: String,
default: '',
},
});
const {
modelValue,
label,
inputClass,
color,
Expand Down Expand Up @@ -102,4 +105,8 @@ const {value: innerValue, errorMessage} = useField(props.name, props.rules, {
{{ label }}
</span>
</label>

<div v-if="errorMessage" class="text-error-500 text-sm">
{{ errorMessage }}
</div>
</template>

0 comments on commit 412820a

Please sign in to comment.