Пример #1
0
 /**
  * @inheritdoc
  */
 protected function validateValue($value)
 {
     $in = false;
     if ($this->allowArray && ($value instanceof \Traversable || is_array($value)) && ArrayHelper::isSubset($value, $this->range, $this->strict)) {
         $in = true;
     }
     if (!$in && ArrayHelper::isIn($value, $this->range, $this->strict)) {
         $in = true;
     }
     return $this->not !== $in ? null : [$this->message, []];
 }