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

Use vd for parameter verification set $>=0 when eq 0 not effective #723

Closed
dingbb opened this issue Apr 14, 2023 · 5 comments
Closed

Use vd for parameter verification set $>=0 when eq 0 not effective #723

dingbb opened this issue Apr 14, 2023 · 5 comments
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@dingbb
Copy link

dingbb commented Apr 14, 2023

Describe the Question
Use vd for parameter verification set $>=0 when eq 0 not effective

A clear and concise description of what the question is.

Reproducible Code

Please construct a minimum complete and reproducible example for us to get the same error. And tell us how to reproduce it like how you send a request or send what request.

Expected behavior
i want values from 0 to 100

Screenshots
image
image

Hertz version:
hz version v0.3.0
cwgo version v0.0.1
thrift v0.13.0
hertz v0.6.0

Environment:
go1.20.2 arm64

Additional context
Use parameter verification
i64 Weight (api.body="weight",api.vd="$>=0 && $=<100; msg:'weight must not in 0 -> 100'")

weight = 0 is error

@welkeyever
Copy link
Member

Unlikely, you can paste all the tag information of the generated struct.

@welkeyever welkeyever added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Apr 14, 2023
@rogerogers
Copy link
Contributor

rogerogers commented Apr 14, 2023

$=<100 -> $<=100?

@rogerogers
Copy link
Contributor

weight must not in 0 -> 100 -> weight must in 0 -> 100 ?

@li-jin-gou
Copy link
Member

$=<100 -> $<=100?

cool @rogerogers 👍🏻

@dingbb
Copy link
Author

dingbb commented Apr 17, 2023

thanks, It has been resolved.

$=<100 -> $<=100?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Development

No branches or pull requests

4 participants