import { schema, rules } from '@ioc:Adonis/Core/Validator'; import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'; export default class ChangePasswordValidator { constructor(protected ctx: HttpContextContract) {} public schema = schema.create({ oldPassword: schema.string({}, [rules.maxLength(128)]), newPassword: schema.string({}, [rules.minLength(6), rules.maxLength(128)]), }); public messages = {}; }