|
|
@@ -388,9 +388,13 @@
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- var $compareWith = validator.getFieldElement(options.field);
|
|
|
- if ($compareWith && value != $compareWith.val()) {
|
|
|
- validator.removeError($compareWith);
|
|
|
+ var compareWith = validator.getFieldElements(options.field);
|
|
|
+ if (compareWith == null) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (value != compareWith.val()) {
|
|
|
+ validator.removeError(compareWith);
|
|
|
return true;
|
|
|
} else {
|
|
|
return false;
|
|
|
@@ -501,9 +505,13 @@
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- var $compareWith = validator.getFieldElement(options.field);
|
|
|
- if ($compareWith && value == $compareWith.val()) {
|
|
|
- validator.removeError($compareWith);
|
|
|
+ var compareWith = validator.getFieldElements(options.field);
|
|
|
+ if (compareWith == null) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (value == compareWith.val()) {
|
|
|
+ validator.removeError(compareWith);
|
|
|
return true;
|
|
|
} else {
|
|
|
return false;
|