updated isvalid to isvalidupload