protected function validator($varInput)
	{
		$this->blnSubmitInput = false;

		if (!\strlen($varInput) && (\strlen($this->varValue) || !$this->mandatory))
		{
			return '';
		}

		// Check password length either from DCA or use Config as fallback (#1087)
		$intLength = $this->minlength ?: Config::get('minPasswordLength');

		if (Utf8::strlen($varInput) < $intLength)
		{
			$this->addError(sprintf($GLOBALS['TL_LANG']['ERR']['passwordLength'], $intLength));
		}

		if ($varInput != $this->getPost($this->strName . '_confirm'))
		{
			$this->addError($GLOBALS['TL_LANG']['ERR']['passwordMatch']);
		}

		$varInput = parent::validator($varInput);

		if (!$this->hasErrors())
		{
			$this->blnSubmitInput = true;

			return password_hash($varInput, PASSWORD_DEFAULT);
		}

		return '';
	}