messageInvalid !== null) { $this->error($this->messageInvalid, $this->stringify($value)); } return false; } $values = array_flip($this->values); if (!isset($values[$value])) { if ($this->messageInvalid !== null) { $this->error($this->messageInvalid, $value); } return false; } return true; } }