mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-26 06:05:54 +08:00
Merge commit 'upstream/master~450' into merge_7_25
This commit is contained in:
8
jquery.validation/index.d.ts
vendored
8
jquery.validation/index.d.ts
vendored
@@ -188,6 +188,14 @@ declare namespace JQueryValidation
|
||||
* @param method The actual method implementation, returning true if an element is valid. First argument: Current value. Second argument: Validated element. Third argument: Parameters.
|
||||
*/
|
||||
addMethod(name: string, method: (value: any, element: HTMLElement, params: any) => boolean, message?: string): void;
|
||||
/**
|
||||
* Add a custom validation method. It must consist of a name (must be a legal javascript identifier), a predicate function and a message generating function.
|
||||
*
|
||||
* @param name The name of the method used to identify it and referencing it; this must be a valid JavaScript identifier
|
||||
* @param method The actual method implementation, returning true if an element is valid. First argument: Current value. Second argument: Validated element. Third argument: Parameters.
|
||||
* @param message Message generator. First argument: Parameters. Second argument: Validated element.
|
||||
*/
|
||||
addMethod(name: string, method: (value: any, element: HTMLElement, params: any) => boolean, message?: (params: any, element: HTMLElement) => string): void;
|
||||
/**
|
||||
* Replaces {n} placeholders with arguments.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user