Deferred Support In Validation

I extended the FileValidator so I could validate images, dimensions etc.

I wanted to make use of some new HTML5 features so the image could be validated client side.

The only problem with this is checking the dimensions uses asynchronous methods (onload=function(){}) so you can’t add any errors.

One way to help and make things more flexible would be to use jQuery deferred.

So a validator could return a deferred object which would hold off the successCallbacks until it’s resolved.

thoughts?