Skip to content

Commit dbac145

Browse files
amansharma612Aman Sharma
andauthored
Removed extra <> in validators example (encode#9590)
Co-authored-by: Aman Sharma <210100011@iitb.ac.in>
1 parent b31413d commit dbac145

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/api-guide/validators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ If we open up the Django shell using `manage.py shell` we can now
4848
CustomerReportSerializer():
4949
id = IntegerField(label='ID', read_only=True)
5050
time_raised = DateTimeField(read_only=True)
51-
reference = CharField(max_length=20, validators=[<UniqueValidator(queryset=CustomerReportRecord.objects.all())>])
51+
reference = CharField(max_length=20, validators=[UniqueValidator(queryset=CustomerReportRecord.objects.all())])
5252
description = CharField(style={'type': 'textarea'})
5353

5454
The interesting bit here is the `reference` field. We can see that the uniqueness constraint is being explicitly enforced by a validator on the serializer field.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy