mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
e7cc2757c3
Co-authored-by: Alexander Lichter <manniL@gmx.net>
18 lines
287 B
Vue
18 lines
287 B
Vue
<template>
|
|
<h1>I am valid</h1>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
validate ({ query }) {
|
|
if (query.error) {
|
|
const err = new Error('Custom Error')
|
|
err.statusCode = parseInt(query.error) || 500
|
|
throw err
|
|
}
|
|
|
|
return Boolean(query.valid)
|
|
}
|
|
}
|
|
</script>
|