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