Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: optimize hertz vd tag description #995

Merged
merged 4 commits into from
Mar 22, 2024

Conversation

chaoranz758
Copy link
Member

@chaoranz758 chaoranz758 commented Mar 4, 2024

What type of PR is this?

docs

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en: docs: optimize hertz vd tag description
zh(optional): 完善 hertz 参数校验文档

(Optional) Which issue(s) this PR fixes:

cloudwego/hertz#1070

@chaoranz758 chaoranz758 requested review from a team as code owners March 4, 2024 06:09
Copy link

vercel bot commented Mar 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cloudwego ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2024 1:35am

@li-jin-gou
Copy link
Member

thanks

@Haswf
Copy link
Contributor

Haswf commented Mar 10, 2024

看了下新增的例子,感觉还是太简单了,需要在两边的文档跳着看。我很久之前提过一个类似的Issue,里面总结了业务开发里常用的校验 Pattern,感觉可以加一下。cloudwego/hertz#652

@li-jin-gou
Copy link
Member

看了下新增的例子,感觉还是太简单了,需要在两边的文档跳着看。我很久之前提过一个类似的Issue,里面总结了业务开发里常用的校验 Pattern,感觉可以加一下。cloudwego/hertz#652

加一下 @chaoranz758

@Haswf
Copy link
Contributor

Haswf commented Mar 18, 2024

@chaoranz758 中文有点翻译的感觉,这样改一下会不会好点:

下面给出常见用法:

  • 校验字符串和切片长度 len($)>0
  • 校验字符串内容 type=="hello" || type == "world"
  • 校验字符串满足正则表达式 regexp('^\\w*$')"
  • 校验数值类型取值范围 $>0
  • 校验指针类型字段 num==nil || num>0
  • 自定义错误信息 msg:'C must be false when S.A>0'"

@li-jin-gou li-jin-gou merged commit ee7bb09 into cloudwego:main Mar 22, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants