mirror of
https://github.com/sergeyyarkov/educt-server.git
synced 2026-10-11 02:09:07 +03:00
14 lines
437 B
TypeScript
14 lines
437 B
TypeScript
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 = {};
|
|
}
|