public function add($name, $constraints)
    {
        if ( ! isset($this->constraints[$name])) {
            $this->constraints[$name] = [];
        }

        if (!is_array($constraints)) {
            $constraints = array($constraints);
        }

        foreach ($constraints as $constraint) {
            $this->constraints[$name][] = $constraint;
        }

        return $this;
    }