protected function resolveErrorKey($messages = [])
	{
		// if there is no error key defined leave messages as they were
		if(empty($this->errorKey))
		{
			return $messages;
		}

		// keys are divided on every .
		$keys = explode('.', $this->errorKey);

		// we need to reverse this array for sorting
		$keys = array_reverse($keys);

		foreach ($keys as $errorKey) {
			$messages = array($errorKey => $messages);
		}

		return $messages;
	}