mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-10-31 02:28:35 +08:00 
			
		
		
		
	Fix #13920: Fixed erroneous validation for specific cases
This commit is contained in:
		| @ -395,9 +395,11 @@ | ||||
|                         data: $form.serialize() + extData, | ||||
|                         dataType: data.settings.ajaxDataType, | ||||
|                         complete: function (jqXHR, textStatus) { | ||||
|                             currentAjaxRequest = null; | ||||
|                             $form.trigger(events.ajaxComplete, [jqXHR, textStatus]); | ||||
|                         }, | ||||
|                         beforeSend: function (jqXHR, settings) { | ||||
|                             currentAjaxRequest = jqXHR; | ||||
|                             $form.trigger(events.ajaxBeforeSend, [jqXHR, settings]); | ||||
|                         }, | ||||
|                         success: function (msgs) { | ||||
| @ -563,6 +565,9 @@ | ||||
|             return; | ||||
|         } | ||||
|  | ||||
|         if (currentAjaxRequest !== null) { | ||||
|             currentAjaxRequest.abort(); | ||||
|         } | ||||
|         if (data.settings.timer !== undefined) { | ||||
|             clearTimeout(data.settings.timer); | ||||
|         } | ||||
| @ -929,4 +934,7 @@ | ||||
|             $form.find(attribute.input).attr('aria-invalid', hasError ? 'true' : 'false'); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     var currentAjaxRequest = null; | ||||
|  | ||||
| })(window.jQuery); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Tim Fischer
					Tim Fischer