public function error($name, $attributes = []) {
		if (!isset($this->_errors[$name])) return '';

		list($attributes) = $this->_prepare($name, $attributes);

		$attributes['data-error-for'] = $attributes['id'];
		unset($attributes['id']);
		$attributes = $this->_arrayToAttributesString($attributes);

		// show only the first error. The others could be consequential error
		$value = $this->_escape(current($this->_errors[$name]));

		return "<span{$attributes}>{$value}</span>";
	}