From 06bf10397fc1b2ff942baa7c3b0f33b465ceeb95 Mon Sep 17 00:00:00 2001 From: Samiul Sk Date: Fri, 12 Jul 2019 19:33:12 +0530 Subject: [PATCH] fix for #6558 default value will not be passed through validated_data --- docs/api-guide/validators.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/api-guide/validators.md b/docs/api-guide/validators.md index 3c3b3d15c..85a20612e 100644 --- a/docs/api-guide/validators.md +++ b/docs/api-guide/validators.md @@ -152,8 +152,6 @@ If you want the date field to be visible, but not editable by the user, then set published = serializers.DateTimeField(read_only=True, default=timezone.now) -The field will not be writable to the user, but the default value will still be passed through to the `validated_data`. - #### Using with a hidden date field. If you want the date field to be entirely hidden from the user, then use `HiddenField`. This field type does not accept user input, but instead always returns its default value to the `validated_data` in the serializer.