public function matches($regexp, $message)
    {
        if (!is_string($regexp) || !is_string($message)) {
            throw new \InvalidArgumentException("Both arguments must be string.");
        }
        $this->constraints[] = (function (Password $str) use ($regexp, $message) {
            if (!preg_match($regexp, $str)) {
                return $message;
            } else {
                return true;
            }
        });
        return $this;
    }