mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 12:14:33 +01:00
20 lines
449 B
TypeScript
Executable File
20 lines
449 B
TypeScript
Executable File
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: 'The field {{field}} is required'
|
|
}
|
|
}
|