mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-29 11:00:27 +01:00
Added Experiences and Formations
This commit is contained in:
19
app/Validators/formation/FormationUpdateValidator.ts
Normal file
19
app/Validators/formation/FormationUpdateValidator.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class FormationUpdateValidator {
|
||||
constructor (protected ctx: HttpContextContract) {
|
||||
}
|
||||
|
||||
public schema = schema.create({
|
||||
title: schema.string.optional(),
|
||||
description: schema.string.optional(),
|
||||
location: schema.string.optional(),
|
||||
beginDate: schema.string.optional(),
|
||||
endDate: schema.string.optional()
|
||||
})
|
||||
|
||||
public messages = {
|
||||
required: 'The field {{field}} is required'
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user