mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-26 09:30:27 +01:00
working
This commit is contained in:
@@ -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 !'
|
||||
}
|
||||
}
|
||||
@@ -13,5 +13,7 @@ export default class StateValidator {
|
||||
})
|
||||
|
||||
|
||||
public messages = {}
|
||||
public messages = {
|
||||
required: 'Le champ {{field}} doit être valide !',
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user