mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-23 16:30:27 +01:00
Lint and update
This commit is contained in:
@@ -1,22 +1,23 @@
|
||||
import {rules, schema} from '@ioc:Adonis/Core/Validator'
|
||||
import {HttpContextContract} from '@ioc:Adonis/Core/HttpContext'
|
||||
import { rules, schema } from '@ioc:Adonis/Core/Validator'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
|
||||
export default class TranslationStoreValidator {
|
||||
public schema = schema.create({
|
||||
code: schema.string({}, [
|
||||
rules.unique({
|
||||
table: 'translations',
|
||||
column: 'code'
|
||||
})
|
||||
column: 'code',
|
||||
}),
|
||||
]),
|
||||
english: schema.string.optional(),
|
||||
french: schema.string.optional()
|
||||
french: schema.string.optional(),
|
||||
})
|
||||
|
||||
public messages = {
|
||||
required: 'The field {{field}} is required',
|
||||
'code.unique': 'The translation code is not unique !'
|
||||
'required': 'The field {{field}} is required',
|
||||
'code.unique': 'The translation code is not unique !',
|
||||
}
|
||||
|
||||
constructor (protected ctx: HttpContextContract) {
|
||||
constructor(protected ctx: HttpContextContract) {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user