index = $index; } public function validate(&$arr, $interchange) { if (!ctype_alnum($arr[$this->index])) { $this->error($arr[$this->index] . ' in '. $this->index .' must be alphanumeric'); } } }