42 public function validate($string, $config, $context)
44 $string = trim($string);
45 if (!$this->case_sensitive) {
47 $string = ctype_lower($string) ? $string : strtolower($string);
49 $result = isset($this->valid_values[$string]);
51 return $result ? $string :
false;
60 public function make($string)
62 if (strlen($string) > 2 && $string[0] ==
's' && $string[1] ==
':') {
63 $string = substr($string, 2);
68 $values = explode(
',', $string);