mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
docs: Improve routing validate
example (#18728)
This commit is contained in:
parent
fcd63a0e18
commit
5eaeb4f83d
@ -132,7 +132,6 @@ If you have a more complex use case, then you can use anonymous route middleware
|
||||
<script setup>
|
||||
definePageMeta({
|
||||
validate: async (route) => {
|
||||
const nuxtApp = useNuxtApp()
|
||||
// Check if the id is made up of digits
|
||||
return /^\d+$/.test(route.params.id)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user