Tightened up ValidationOptions

Using a combination of the source code and the documentation at
http://jqueryvalidation.org/validate/ I've tightened up the
ValidationOptions.  NB success remains as any because (AFAIK) it's not
possible to model alternate overloads in an interface with TypeScript (
https://typescript.codeplex.com/workitem/1893 ).
This commit is contained in:
John Reilly
2013-11-15 11:57:53 +00:00
parent 7e27883f30
commit 6e0a06f02f

View File

@@ -10,28 +10,28 @@ interface ValidationOptions
{
debug?: boolean;
errorClass?: string;
errorContainer?: any;
errorContainer?: string;
errorElement?: string;
errorLabelContainer?: any;
errorPlacement?: Function;
errorLabelContainer?: string;
errorPlacement?: (error: JQuery, element: JQuery) => void;
focusCleanup?: boolean;
focusInvalid?: boolean;
groups?: any;
highlight?: Function;
ignore?: any;
groups?: Object;
highlight?: (element: HTMLElement, errorClass: string, validClass: string) => void;
ignore?: string;
ignoreTitle?: boolean;
invalidHandler?: Function;
messages?: any;
invalidHandler?: (event: JQueryEventObject, validator: Validator) => void;
messages?: Object;
meta?: string;
onclick?: boolean;
onfocusout?: boolean;
onkeyup?: boolean;
onsubmit?: boolean;
rules?: any;
showErrors?: Function;
submitHandler?: Function;
rules?: Object;
showErrors?: (errorMap: Object, errorList: ErrorListItem[]) => void;
submitHandler?: (form: HTMLFormElement) => void;
success?: any;
unhighlight?: Function;
unhighlight?: (element: HTMLElement, errorClass: string, validClass: string) => void;
validClass?: string;
wrapper?: string;
}