mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-22 07:50:27 +01:00
debug
This commit is contained in:
19
app/Validators/location/LocationValidator.ts
Normal file
19
app/Validators/location/LocationValidator.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import {schema} from '@ioc:Adonis/Core/Validator'
|
||||
|
||||
export default class LocationValidator {
|
||||
constructor (private ctx: HttpContextContract) {
|
||||
}
|
||||
|
||||
public schema = schema.create({
|
||||
place: schema.string(),
|
||||
since: schema.date(),
|
||||
left: schema.string(),
|
||||
})
|
||||
|
||||
public cacheKey = this.ctx.routeKey
|
||||
|
||||
public messages = {
|
||||
required: 'Le champ {{field}} doit être valide !',
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user