Example #1
0
 public function Form_Validate($blnToReturn = true)
 {
     if ($this->txtAssignedTo->Required && $this->txtAssignedTo->Text == '[none]') {
         $this->txtAssignedTo->Warning = 'Required';
         $blnToReturn = false;
     }
     foreach ($this->txtMutableFields as $intIssueFieldId => $txtField) {
         if ($txtField->Visible && strlen(trim($txtField->Text))) {
             $strToken = IssueFieldOption::TokenizeName($txtField->Text);
             if (IssueFieldOption::LoadByIssueFieldIdToken($intIssueFieldId, $strToken)) {
                 $txtField->Warning = 'Value already exists';
                 $blnToReturn = false;
             }
         }
     }
     return parent::Form_Validate($blnToReturn);
 }