mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-18 22:11:34 +01:00
18 lines
463 B
TypeScript
18 lines
463 B
TypeScript
import { schema } from '@ioc:Adonis/Core/Validator'
|
|
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
|
|
|
export default class AnnounceStoreValidator {
|
|
constructor (protected ctx: HttpContextContract) {
|
|
}
|
|
|
|
public schema = schema.create({
|
|
code: schema.string(),
|
|
cover: schema.string.optional(),
|
|
color: schema.string(),
|
|
hoverColor: schema.string()
|
|
})
|
|
public messages = {
|
|
required: 'The field {{field}} is required'
|
|
}
|
|
}
|