values = $values; } /** * Convert the rule to a validation string. * * @return string */ public function __toString() { $values = array_map(function ($value) { return '"'.str_replace('"', '""', $value).'"'; }, $this->values); return $this->rule.':'.implode(',', $values); } }