import { IDictionary } from './interfaces'; /** * Used to create validations for fields in JSON */ export declare class Validation { /** * Registers a new validation or overwrites if it exists. * All validation methods have an optional configuration parameter and return a method. * @param name Validation name * @param method Validation method */ static register(name: string, method: (config?: IDictionary) => (value: any) => boolean | string): void; /** * Unregisters a validation * @param name Validation name */ static unregister(name: string): void; /** * Retrieves a validation * @param name Validation name * @returns Registered validation * @throws Will throw if validation not exists */ static get(name: string): (config?: any) => (value: any) => string | boolean; /** * Retrieves all registered validations * @returns All registered validations */ static getAll(): { [key: string]: (config?: any) => (value: any) => string | boolean; }; }