function Check($value)
 {
     $isEqual = String::Compare($value, $this->compareValue, $this->ignoreCase);
     if ($this->equalsNot && $isEqual) {
         $this->error = self::Equals;
     } else {
         if (!$this->equalsNot && !$isEqual) {
             $this->error = self::EqualsNot;
         }
     }
     return $this->error == '';
 }