UNPKG

647 BTypeScriptView Raw
1/// <reference types="@adonisjs/validator" />
2declare module '@ioc:Adonis/Core/Validator' {
3 import { Rule } from '@ioc:Adonis/Core/Validator';
4 type DbRowCheckOptions = {
5 table: string;
6 column: string;
7 dateFormat?: string;
8 connection?: string;
9 caseInsensitive?: boolean;
10 constraints?: {
11 [key: string]: any;
12 };
13 where?: {
14 [key: string]: any;
15 };
16 whereNot?: {
17 [key: string]: any;
18 };
19 };
20 interface Rules {
21 exists(options: DbRowCheckOptions): Rule;
22 unique(options: DbRowCheckOptions): Rule;
23 }
24}