📅  最后修改于: 2022-03-11 14:48:27.195000             🧑  作者: Mango
import { schema, rules } from '@ioc:Adonis/Core/Validator'
{
slug: schema.string({}, [
rules.exists({ table: 'categories', column: 'slug' })
])
}