fn.yiiactiveform.validate errorCallback

Morning.

I’ve got a few questions regarding fn.yiiactiveform.validate and errorCallback.

  1. It seems like errorCallback can only be specified for custom code that calls validate, and not for the standard Yii validate methods etc. Is this by design?

  2. Is there any reason why errorCallback cannot be specified in IE $form.data(‘settings’)? This would make it much easier to have a custom handler without overriding things.

  3. Is there any reason why $ajax.error is implemented even if errorCallback is empty? This prevents people from using $ajaxSetup.error.

For the 3rd point - you can use the global .ajaxError() - http://api.jquery.com/ajaxError/

Yeah, that would work. It would still be nice to be able to customize errorCallback so we can execute code with access to the form/settings.

IMO option 2 would be a nice implementation, and it will not break BC.