import { schema , rules } from '@ioc:Adonis/Core/Validator' ; import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext' ; export default class AskValidator { constructor ( protected ctx ) { } public schema = schema . create ( { prompt : schema . string ( { escape : true } , [ rules . minLength ( 5 ) , rules . maxLength ( 126 ) ] ) } ) ; /**
     * Custom messages for validation failures. You can make use of dot notation `(.)`
     * for targeting nested fields and array expressions `(*)` for targeting all
     * children of an array. For example:
     *
     * {
     *   'profile.username.required': 'Username is required',
     *   'scores.*.number': 'Define scores as valid numbers'
     * }
     *
     */ public messages = { } ; }