When are the validators called: before or after a file gets uploaded?

Not all file information becomes available immediately, i.e If you want to check dimensions, wait until originalImageInfo becomes something other than null. You can find some examples here:  https://uploadcare.com/documentation/javascript_api/#validation

Here is an excerpt from our  documentation:

"Validators are called as soon as new information about file becomes available. All fields unknown at the calling time are null. This means one validator can be called more then once for one file and should test if validated field is not null."