form_set_error('upload','You must select a valid file to upload.');
}
//there is a bug in Drupal file validator, refer http://api.drupal.org/api/function/file_validate_extensions it Bypass validation for uid = 1 so using custom validation functions which is same as drupal file_validate_extensions but it does not Bypass for uid = 1
$error_msg.=!empty($error_msg)?'<p>'.t('Import Failed. These lines were found to have an invalid number of fields in @filename.',array('@filename'=>$file->filename)).'</p>':'';
$errors='<p>'.t('The file is %filesize exceeding the maximum file size of %maxsize.',array('%filesize'=>format_size($file->filesize),'%maxsize'=>format_size($file_limit))).'</p>';
$errors='<p>'.t('The file is %filesize which would exceed your disk quota of %quota.',array('%filesize'=>format_size($file->filesize),'%quota'=>format_size($user_limit))).'</p>';