mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-24 16:50:26 +01:00
Working on new version of website
Signed-off-by: Arthur DANJOU <arthurdanjou@outlook.fr>
This commit is contained in:
16
app/Validators/profile/ProfileUpdateValidator.ts
Normal file
16
app/Validators/profile/ProfileUpdateValidator.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import {schema} from '@ioc:Adonis/Core/Validator'
|
||||
import {HttpContextContract} from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class ProfileUpdateValidator {
|
||||
public schema = schema.create({
|
||||
age: schema.number.optional(),
|
||||
hiring_status: schema.string.optional(),
|
||||
hiring_color: schema.string.optional()
|
||||
})
|
||||
public messages = {
|
||||
required: 'The field {{field}} is required'
|
||||
}
|
||||
|
||||
constructor (protected ctx: HttpContextContract) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user