public function isValidField($key, array $def)
 {
     if (isset($def['studio'])) {
         if (is_array($def['studio'])) {
             // Bug 54507 - Need to set the view properly for portal
             // Portal editor requests vary in that the requested view is ListView
             // but what we really need is portallistview, which is in $this->view
             // All other instances of ListLayoutMetaDataParser set $this->view
             // to $_REQUEST['view']
             $view = $this->view;
             // Handle client specific studio setting for a field
             $clientRules = AbstractMetaDataParser::getClientStudioValidation($def['studio'], $view, $this->client);
             if ($clientRules !== null) {
                 return $clientRules;
             }
             // fix for removing email1 field from studio popup searchview - bug 42902
             if ($view == 'popupsearch' && $key == 'email1') {
                 return false;
             }
             //end bug 42902
             // Bug 54507 Return explicit setting of a fields view setting if there is one
             if (!empty($view) && isset($def['studio'][$view])) {
                 return $def['studio'][$view] !== false && (string) $def['studio'][$view] != 'false' && (string) $def['studio'][$view] != 'hidden';
             }
             if (isset($def['studio']['listview'])) {
                 return $def['studio']['listview'] !== false && (string) $def['studio']['listview'] != 'false' && (string) $def['studio']['listview'] != 'hidden';
             }
             // End Bug 54507
             if (isset($def['studio']['visible'])) {
                 return $def['studio']['visible'];
             }
         } else {
             if (is_string($def['studio'])) {
                 return $def['studio'] != 'false' && $def['studio'] != 'hidden';
             } else {
                 if (is_bool($def['studio'])) {
                     return $def['studio'];
                 }
             }
         }
     }
     //Bug 32520. We need to dissalow currency_id fields on list views.
     //This should be removed once array based studio definitions are in.
     if (isset($def['type']) && $def['type'] == "id" && $def['name'] == 'currency_id') {
         return false;
     }
     //Check fields types
     if (isset($def['dbType']) && $def['dbType'] == "id") {
         return false;
     }
     if (isset($def['type'])) {
         if ($def['type'] == 'html' || $def['type'] == 'parent' && !$this->allowParent || $def['type'] == "id" || $def['type'] == "link" || $def['type'] == 'image') {
             return false;
         }
     }
     //hide currency_id, deleted, and _name fields by key-name
     if (strcmp($key, 'deleted') == 0) {
         return false;
     }
     //if all the tests failed, the field is probably ok
     return true;
 }