The validate method
Nuxt lets you define a validator method inside your dynamic route component.
- 
Type: FunctionorAsync Function
validate is called every time before navigating to a new route. It will be called server-side once (on the first request to the Nuxt app) and client-side when navigating to further routes. This method takes the context  object as an argument.
validate({ params, query, store }) {
  return true // if the params are valid
  return false // will stop Nuxt to render the route and display the error page
}
async validate({ params, query, store }) {
  // await operations
  return true // if the params are valid
  return false // will stop Nuxt to render the route and display the error page
}
You can also return promises:
validate({ params, query, store }) {
  return new Promise((resolve) => setTimeout(() => resolve()))
}
Nuxt lets you define a validator method inside your dynamic route component (In this example: pages/users/_id.vue).
If the validate method does not return true, Nuxt will automatically load the 404 error page.
export default {
  validate({ params }) {
    // Must be a number
    return /^\d+$/.test(params.id)
  }
}
You can also check some data in your store  for example (filled by nuxtServerInit  before action):
export default {
  validate({ params, store }) {
    // Check if `params.id` is an existing category
    return store.state.categories.some(category => category.id === params.id)
  }
}
You can also throw expected or unexpected errors during validate function execution:
export default {
  async validate({ params, store }) {
    // Throws a 500 internal server error with custom message
    throw new Error('Under Construction!')
  }
}
 Sébastien Chopin
 
        Sébastien Chopin
        Nazaré da Piedade
 
        Nazaré da Piedade
        Nobu
 
        Nobu
        川音리오
 
        川音리오
        Maciek Palmowski
 
        Maciek Palmowski
        Nestor Vera
 
        Nestor Vera
        Daniel Roe
 
        Daniel Roe
        Yue Yang
 
        Yue Yang
        Jeronimas
 
        Jeronimas
        Clément Ollivier
 
        Clément Ollivier
        Alexander Lichter
 
        Alexander Lichter
        N3-rd
 
        N3-rd
        Adrien Zaganelli
 
        Adrien Zaganelli
        Mag
 
        Mag
        Stefan Huber
 
        Stefan Huber
        Olga Bulat
 
        Olga Bulat
        Paiva
 
        Paiva
        Florian Reuschel
 
        Florian Reuschel
        Savas Vedova
 
        Savas Vedova
        HIJACK
 
        HIJACK
        Vinícius Alves
 
        Vinícius Alves
        Kareem Dabbeet
 
        Kareem Dabbeet
        Valentín Costa
 
        Valentín Costa
        Ryan Skinner
 
        Ryan Skinner
        Alex Hirzel
 
        Alex Hirzel
        Ajeet Chaulagain
 
        Ajeet Chaulagain
        René Eschke
 
        René Eschke
        Nico Devs
 
        Nico Devs
        Muhammad
 
        Muhammad
        Naoki Hamada
 
        Naoki Hamada
        Tom
 
        Tom
        Yann Aufray
 
        Yann Aufray
        Anthony Chu
 
        Anthony Chu
        Nuzhat Minhaz
 
        Nuzhat Minhaz
        Lucas Portet
 
        Lucas Portet
        Richard Schloss
 
        Richard Schloss
        Bobby
 
        Bobby
        bpy
 
        bpy
        Antony Konstantinidis
 
        Antony Konstantinidis
        Hibariya
 
        Hibariya
        Jose Seabra
 
        Jose Seabra
        Eze
 
        Eze
        Florian Lefebvre
 
        Florian Lefebvre
        Lucas Recoaro
 
        Lucas Recoaro
        Julien SEIXAS
 
        Julien SEIXAS