Skip to content

Commit

Permalink
馃摑 Add tip about using alias for form data fields (#5329)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Sep 1, 2022
1 parent 0e1a9d1 commit adf4e77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/en/docs/tutorial/request-forms.md
Expand Up @@ -27,7 +27,7 @@ For example, in one of the ways the OAuth2 specification can be used (called "pa

The <abbr title="specification">spec</abbr> requires the fields to be exactly named `username` and `password`, and to be sent as form fields, not JSON.

With `Form` you can declare the same metadata and validation as with `Body` (and `Query`, `Path`, `Cookie`).
With `Form` you can declare the same configurations as with `Body` (and `Query`, `Path`, `Cookie`), including validation, examples, an alias (e.g. `user-name` instead of `username`), etc.

!!! info
`Form` is a class that inherits directly from `Body`.
Expand Down

0 comments on commit adf4e77

Please sign in to comment.