vendor/assets/js/foundation.abide.js in foundation-rails-6.1.1.3 vs vendor/assets/js/foundation.abide.js in foundation-rails-6.1.2.0

- old
+ new

@@ -188,11 +188,11 @@ * * @param {Object} $el - jQuery object to use as reference to find the form error selector. * @returns {Object} jQuery object with the selector. */ Abide.prototype.findFormError = function($el){ - var $error = $el.siblings(this.options.formErrorSelector) + var $error = $el.siblings(this.options.formErrorSelector); if(!$error.length){ $error = $el.parent().find(this.options.formErrorSelector); } return $error; }; @@ -289,10 +289,10 @@ * Fires when the input is done checking for validation. Event trigger is either `valid.zf.abide` or `invalid.zf.abide` * Trigger includes the DOM element of the input. * @event Abide#valid * @event Abide#invalid */ - $el.trigger(message, $el[0]); + $el.trigger(message, [$el]); return goodToGo; }; /** * Goes through a form and if there are any invalid inputs, it will display the form error element