function error($field = '', $prefix = '', $suffix = '') { if (!empty($this->_field_data[$field]) && $this->_field_data[$field]['is_array']) { return ($prefix ? $prefix : $this->_error_prefix) . array_shift($this->_field_data[$field]['error']) . ($suffix ? $suffix : $this->_error_suffix); } return parent::error($field, $prefix, $suffix); }
public function error($field, $prefix = '', $suffix = '') { if (!empty($this->_old_field_data[$field]['error'])) { if ($prefix === '') { $prefix = $this->_error_prefix; } if ($suffix === '') { $suffix = $this->_error_suffix; } return $prefix . $this->_old_field_data[$field]['error'] . $suffix; } return parent::error($field, $prefix, $suffix); }