$this->validfields[] = array('myfield', TYPE_STR, REQ_NO, 'if ($data != 'notallowed') { return true; } else {return false; }'));