]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Add tip about using alias for form data fields (#5329)
authorSebastián Ramírez <tiangolo@gmail.com>
Thu, 1 Sep 2022 09:05:41 +0000 (11:05 +0200)
committerGitHub <noreply@github.com>
Thu, 1 Sep 2022 09:05:41 +0000 (09:05 +0000)
docs/en/docs/tutorial/request-forms.md

index 2021a098f928a4fba6a78e7c5c4ef93d6dcf08ae..26922685a6fd7af0111c7f991e9ac8065d7d8849 100644 (file)
@@ -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`.