mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 20:19:26 +01:00
20 lines
460 B
TypeScript
20 lines
460 B
TypeScript
import { schema } from '@ioc:Adonis/Core/Validator'
|
|
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
|
|
|
export default class ProjectValidator {
|
|
constructor (protected ctx: HttpContextContract) {
|
|
}
|
|
|
|
public schema = schema.create({
|
|
name: schema.string(),
|
|
description: schema.string(),
|
|
progress: schema.number(),
|
|
url: schema.string()
|
|
})
|
|
|
|
|
|
public messages = {
|
|
required: 'Le champ {{field}} doit être valide !',
|
|
}
|
|
}
|