You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's me again, there's more deprecated code in parsley.js that should be removed.
JQMIGRATE: deferred.pipe() is deprecated
Here's the deprecation notice
Deprecation Notice: As of jQuery 1.8, the deferred.pipe() method is deprecated. The deferred.then() method, which replaces it, should be used instead.
Comes from:
whenValidate: function whenValidate() {
var _Utils$all$done$fail$always,
_this6 = this;
var _ref7 = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var group = _ref7.group;
var force = _ref7.force;
var event = _ref7.event;
this.submitEvent = event;
if (event) {
this.submitEvent = _extends({}, event, { preventDefault: function preventDefault() {
Utils.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`");
_this6.validationResult = false;
} });
}
this.validationResult = true;
// fire validate event to eventually modify things before every validation
this._trigger('validate');
// Refresh form DOM options and form's fields that could have changed
this._refreshFields();
var promises = this._withoutReactualizingFormOptions(function () {
return $.map(_this6.fields, function (field) {
return field.whenValidate({ force: force, group: group });
});
});
return (_Utils$all$done$fail$always = Utils.all(promises).done(function () {
_this6._trigger('success');
}).fail(function () {
_this6.validationResult = false;
_this6.focus();
_this6._trigger('error');
}).always(function () {
_this6._trigger('validated');
})).pipe.apply(_Utils$all$done$fail$always, _toConsumableArray(this._pipeAccordingToValidationResult()));
},
and
// Validate field and trigger some events for mainly `UI`
// @returns a promise that succeeds only when all validations do
// or `undefined` if field is not in the given `group`.
whenValidate: function whenValidate() {
var _whenValid$always$done$fail$always,
_this10 = this;
var _ref9 = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var force = _ref9.force;
var group = _ref9.group;
// do not validate a field if not the same as given validation group
this.refresh();
if (group && !this._isInGroup(group)) return;
this.value = this.getValue();
// Field Validate event. `this.value` could be altered for custom needs
this._trigger('validate');
return (_whenValid$always$done$fail$always = this.whenValid({ force: force, value: this.value, _refreshed: true }).always(function () {
_this10._reflowUI();
}).done(function () {
_this10._trigger('success');
}).fail(function () {
_this10._trigger('error');
}).always(function () {
_this10._trigger('validated');
})).pipe.apply(_whenValid$always$done$fail$always, _toConsumableArray(this._pipeAccordingToValidationResult()));
},
P.S. If there is any other way to find out deprecated code, then do let me know. :)
The text was updated successfully, but these errors were encountered:
It's me again, there's more deprecated code in parsley.js that should be removed.
Here's the deprecation notice
Comes from:
and
P.S. If there is any other way to find out deprecated code, then do let me know. :)
The text was updated successfully, but these errors were encountered: