mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 20:19:26 +01:00
Working on new version of website
Signed-off-by: Arthur DANJOU <arthurdanjou@outlook.fr>
This commit is contained in:
18
app/Validators/form/FormStoreValidator.ts
Executable file
18
app/Validators/form/FormStoreValidator.ts
Executable file
@@ -0,0 +1,18 @@
|
||||
import {schema} from '@ioc:Adonis/Core/Validator'
|
||||
import {HttpContextContract} from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class FormStoreValidator {
|
||||
constructor (protected ctx: HttpContextContract) {
|
||||
}
|
||||
|
||||
public schema = schema.create({
|
||||
name: schema.string(),
|
||||
email: schema.string(),
|
||||
subject: schema.string(),
|
||||
content: schema.string()
|
||||
})
|
||||
|
||||
public messages = {
|
||||
required: 'The field {{field}} is required'
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user