public static function spec(
        $constraints,
        $defaults = [],
        $required = [],
        $messages = []
    ) {
        return new static(
            Spec::define($constraints, $defaults, $required),
            $messages
        );
    }