mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 20:19:26 +01:00
21 lines
540 B
TypeScript
Executable File
21 lines
540 B
TypeScript
Executable File
import {schema} from '@ioc:Adonis/Core/Validator'
|
|
import {HttpContextContract} from '@ioc:Adonis/Core/HttpContext'
|
|
|
|
export default class ProjectStoreValidator {
|
|
constructor (protected ctx: HttpContextContract) {
|
|
}
|
|
|
|
public schema = schema.create({
|
|
name: schema.string(),
|
|
description: schema.string(),
|
|
progress: schema.number(),
|
|
url: schema.string(),
|
|
cover: schema.string(),
|
|
tags: schema.array.optional().members(schema.string())
|
|
})
|
|
|
|
public messages = {
|
|
required: 'The field {{field}} is required'
|
|
}
|
|
}
|