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: translate hertz/tutorials/basic-feature/bindAndValidate and fix markdown syntax error in zh docs #216

Merged
merged 4 commits into from
Jun 24, 2022

Conversation

Skyenought
Copy link
Contributor

No description provided.

@Skyenought Skyenought changed the title docs: translate hertz/tutorials/basic-feature/bindAndValidate docs: translate hertz/tutorials/basic-feature/bindAndValidate and fix markdown syntax error in zh docs Jun 21, 2022

### How to customize the validation function

You can implement complex validation logic in the `vd` tag by registering a custom validation function([demo](https://github.com/cloudwego/hertz-examples/tree/main/binding/custom_validate_func)),The method of use is as follows:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同 使用方法


### How to configure "looseZero"

In some cases, the information sent from the front end is only the key but not value, which causes `cause=parameter type does not match binding data` when binding a numeric type. At this time, you need to configure looseZero mode ([demo](https://github.com/cloudwego/hertz-examples/tree/main/binding/loose_zero)). The method of use is as follows:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

翻译的时候突出一下只包含了 key,但是没有 value 吧

@Skyenought Skyenought force-pushed the commit-for-param branch 2 times, most recently from 8b3ec7a to ad017dd Compare June 22, 2022 06:29
@GuangmingLuo GuangmingLuo merged commit eb27ea7 into cloudwego:main Jun 24, 2022
@Skyenought Skyenought deleted the commit-for-param branch June 24, 2022 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants