Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

The Vue.js Master Class

Vue.js Custom Prop Validation

🚧 PLEASE NOTE: This masterclass is built with the Options API

The Composition API Masterclass is coming soon!

In this vue.js tutorial, we'll take a look at the custom prop validation, which is an exciting and convenient feature of Vue.js. With a custom prop validator, you can create custom logic to validate that the component received precisely what it needs.

In this lesson, we'll create a custom validator for our post prop, and also throw errors in the console if the post is invalid.