mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 20:19:26 +01:00
20 lines
458 B
TypeScript
Executable File
20 lines
458 B
TypeScript
Executable File
import type { 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',
|
|
}
|
|
}
|