# 跟GPT打配合偷懒小日常

* 抖音：<https://v.douyin.com/iL2P93cn/>
* B站：<https://www.bilibili.com/video/BV18k4y197S3/>

我们在日常开发的时候

经常会碰到一些（规则）比较复杂的表单验证

比如说这个集装箱号哈

那开发的时候没什么问题

就正常按规则验证就好了

但是呢麻烦就麻烦在测试上

因为他有的是b

天象

我今天就发现一个偷懒的方法啊

大家看这不是表单验证的函数吗

我们把它复制到GPT里

好呢发给他

下边告诉他

根据这个方法

反向写一个生成测试数据的GS

然后呢把这个方法复制一下

我之前都复制过了哈

然后呢我们打开Alfred（之前分享过）

新建一个工作流（添加一个workflow）

大家Windows的话

应该是uTools也可以哈

然后把这个方法放进来

然后在最后生成哈

最终怎么用呢

大家看啊

调出来Alfred

然后jzx（集装箱）

就有了这样就通过了

然后写别的就不行

然后再来一个看看

每次都不一样


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sunzsh.gitbook.io/xiaoshan.bug/gen-gpt-da-pei-he-tou-lan-xiao-ri-chang.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
