mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 12:14:33 +01:00
20 lines
556 B
TypeScript
20 lines
556 B
TypeScript
import { schema } from '@ioc:Adonis/Core/Validator'
|
|
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
|
|
|
export default class ProjectUpdateValidator {
|
|
public schema = schema.create({
|
|
name: schema.string.optional(),
|
|
description: schema.string.optional(),
|
|
url: schema.string.optional(),
|
|
cover: schema.string.optional(),
|
|
tags: schema.array.optional().members(schema.string()),
|
|
})
|
|
|
|
public messages = {
|
|
required: 'The field {{field}} is required',
|
|
}
|
|
|
|
constructor(protected ctx: HttpContextContract) {
|
|
}
|
|
}
|