diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-10-25 12:27:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-25 12:27:27 +0200 |
| commit | 718b32c6918037cfc746d7867333d79a3c887a8c (patch) | |
| tree | bf12588ca5af8a567d61a04b10c0879eee288f37 /docs/ref/forms/fields.txt | |
| parent | ee104251c403fbac83b8475163ff2ac01c567d25 (diff) | |
Added missing pycon directives in various docs.
Diffstat (limited to 'docs/ref/forms/fields.txt')
| -rw-r--r-- | docs/ref/forms/fields.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 35fc4b4b27..df9732f1af 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -1183,11 +1183,13 @@ Slightly complex built-in ``Field`` classes The list of fields that should be used to validate the field's value (in the order in which they are provided). + .. code-block:: pycon + >>> from django.forms import ComboField >>> f = ComboField(fields=[CharField(max_length=20), EmailField()]) - >>> f.clean('test@example.com') + >>> f.clean("test@example.com") 'test@example.com' - >>> f.clean('longemailaddress@example.com') + >>> f.clean("longemailaddress@example.com") Traceback (most recent call last): ... ValidationError: ['Ensure this value has at most 20 characters (it has 28).'] |
