import { Response } from "./Response"; export interface ValidatorOptions { errorAlert?: string; /** * Called before the submit of the form data, you can return the data to be serialised. */ onSubmit?: (sender: Validator) => void; /** * Called when submit is complete. */ onComplete?: (data: Response, sender?: Validator) => void; /** * Called when an error occurs. */ onError?: (jqXHR: any, textStatus: any, errorThrown: any) => void; serializationFunction?: () => string; useAjax?: boolean; } export declare class Validator { element: HTMLFormElement; options: ValidatorOptions; /** * @param element The datalist element. The element must have a data-url attribute to connect to a feed. */ constructor(element: HTMLFormElement, options: ValidatorOptions); submitForm(): void; }