function contains($field_name) { return in_array($field_name, $this->required) || in_array($field_name, $this->optional); }