Fix bug that file is not uploaded when validation is not set in the file field.