Home

Issue: 3018

feature request : provide context in validator method of pages

[issue link]

currently the validator method in pages https://nuxtjs.org/api/pages-validate does not have context passed in its parameters.
It would be better if this could be implemented

validate(context) {
  console.log(context)  // { app, redirect, store, ...}
  return true // if the params are valid
  return false // will stop Nuxt.js to render the route and display the error page
}

Actually, I need the redirect function

This question is available on Nuxt.js community (#c2615)