def METHOD_NAME(self, file):
    if file['size'] < MIN_FILE_SIZE:
        file['error'] = 'File is too small'
    elif file['size'] > MAX_FILE_SIZE:
        file['error'] = 'File is too big'
    elif not ACCEPT_FILE_TYPES.match(file['type']):
        file['error'] = 'Filetype not allowed'
    else:
        return True
    return False