This commit is contained in:
2020-12-19 21:16:44 +01:00
parent 48fa997811
commit 7478e85bae
11 changed files with 149 additions and 44 deletions

View File

@@ -1,19 +0,0 @@
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
import {schema} from '@ioc:Adonis/Core/Validator'
export default class UpdateValidator {
constructor (private ctx: HttpContextContract) {
}
public schema = schema.create({
place: schema.string.optional(),
since: schema.date.optional(),
left: schema.string.optional(),
})
public cacheKey = this.ctx.routeKey
public messages = {
required: 'Le champ {{field}} doit être valide !'
}
}