Skip to content

Commit dbac145

Browse files
amansharma612Aman Sharma
and
Aman Sharma
authored
Removed extra <> in validators example (#9590)
Co-authored-by: Aman Sharma <[email protected]>
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

+1-1
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)