Core: Added precondition to call isValidElement method

This commit is contained in:
Brahim Arkni
2015-09-25 17:28:23 +01:00
parent d8c92a168d
commit f3547be165

View File

@@ -514,6 +514,9 @@ $.extend( $.validator, {
// true If the field is valid // true If the field is valid
// false If the field is invalid // false If the field is invalid
// undefined If the field is not validated yet. // undefined If the field is not validated yet.
//
// Note that this method assumes that you have
// already called `validate()` on your form
isValidElement: function( element ) { isValidElement: function( element ) {
return this.invalid[ element.name ] === undefined ? undefined : !this.invalid[ element.name ]; return this.invalid[ element.name ] === undefined ? undefined : !this.invalid[ element.name ];
}, },