mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-22 20:37:58 +08:00
Merge pull request #3601 from lpperras/master
Add element Validator union to support JQuery object.
This commit is contained in:
@@ -187,6 +187,7 @@ function test_methods() {
|
||||
});
|
||||
$("#myform").validate().form();
|
||||
$("#myform").validate().element("#myselect");
|
||||
$("#myform").validate().element($("#myselect"));
|
||||
var validator = $("#myform").validate();
|
||||
validator.resetForm();
|
||||
validator.showErrors({ "firstname": "I know that your firstname is Pete, Pete!" });
|
||||
|
||||
2
jquery.validation/jquery.validation.d.ts
vendored
2
jquery.validation/jquery.validation.d.ts
vendored
@@ -186,7 +186,7 @@ interface Validator
|
||||
*
|
||||
* @param element An element to validate, must be inside the validated form. eg "#myselect"
|
||||
*/
|
||||
element(element: string): boolean;
|
||||
element(element: string|JQuery): boolean;
|
||||
/**
|
||||
* Validates the form, returns true if it is valid, false otherwise.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user