UNPKG

@athenna/validator

Version:

The Athenna validation solution. Built on top of VineJS.

35 lines (34 loc) 1.03 kB
/** * @athenna/validator * * (c) João Lenon <lenon@athenna.io> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ import { ServiceProvider } from '@athenna/ioc'; import type { UniqueOptions, ExistsOptions } from '#src/types'; declare module '@vinejs/vine' { interface VineString { unique(options: UniqueOptions): this; exists(options: ExistsOptions): this; } } export declare class ValidatorProvider extends ServiceProvider { register(): Promise<void>; boot(): Promise<void>; registerValidators(): Promise<void>; registerValidatorByMeta(validator: unknown): Promise<import("@athenna/ioc").ServiceMeta>; registerNamedValidators(): Promise<void>; /** * Get the meta URL of the project. */ getMeta(): any; /** * Fabricate the named validator aliases. */ getNamedValidatorAlias(name: string, Validator: any): { alias: string; namedAlias: string; }; }