Validation fix for file uploads