8000 refactor(validation): update conditional to use ternanry · adonisjs/lucid.adonisjs.com@5332877 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5332877

Browse files
committed
refactor(validation): update conditional to use ternanry
1 parent 16a9c77 commit 5332877

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/guides/validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const schema = vine.object({
9696
// highlight-start
9797
.exists((db, value) => {
9898
const row = await db.from('categories').where('slug', value).first()
99-
return row !== null
99+
return row ? true : false
100100
}),
101101
// highlight-end
102102
})

0 commit comments

Comments
 (0)
0