mirror of
https://github.com/sergeyyarkov/educt-server.git
synced 2026-10-11 02:09:07 +03:00
13 lines
405 B
TypeScript
13 lines
405 B
TypeScript
import { schema, rules } from '@ioc:Adonis/Core/Validator';
|
|
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext';
|
|
|
|
export default class DetachStudentstValitator {
|
|
constructor(protected ctx: HttpContextContract) {}
|
|
|
|
public schema = schema.create({
|
|
students: schema.array().members(schema.string({}, [rules.exists({ table: 'users', column: 'id' })])),
|
|
});
|
|
|
|
public messages = {};
|
|
}
|