public function minLength($n)
    {
        $this->constraints[] = (function (Password $str) use ($n) {
            if (mb_strlen($str) < $n) {
                return sprintf("Minimum password length is %d characters.", $n);
            } else {
                return true;
            }
        });
        return $this;
    }