mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 20:19:26 +01:00
18 lines
465 B
TypeScript
18 lines
465 B
TypeScript
import {schema} from '@ioc:Adonis/Core/Validator'
|
|
import {HttpContextContract} from '@ioc:Adonis/Core/HttpContext'
|
|
|
|
export default class PostUpdateValidator {
|
|
|
|
public schema = schema.create({
|
|
slug: schema.string.optional(),
|
|
likes: schema.number.optional(),
|
|
tags: schema.array.optional().members(schema.string())
|
|
})
|
|
public messages = {
|
|
required: 'The field {{field}} is required'
|
|
}
|
|
|
|
constructor (protected ctx: HttpContextContract) {
|
|
}
|
|
}
|