aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/fields.md
diff options
context:
space:
mode:
authorStephan Groß2013-02-26 11:09:54 +0100
committerStephan Groß2013-03-01 16:48:20 +0100
commit9157db5da0b5601793d1a9f24e9cb10670a82be2 (patch)
treed0c323884c4b5efd05fc40893b25bb18c6cc572d /docs/api-guide/fields.md
parent282af6057f30b5af4665d687200ee1ebf82fcf00 (diff)
downloaddjango-rest-framework-9157db5da0b5601793d1a9f24e9cb10670a82be2.tar.bz2
Add better date / datetime validation (pull 2)
addition to #631 with update to master + timefield support
Diffstat (limited to 'docs/api-guide/fields.md')
-rw-r--r--docs/api-guide/fields.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md
index d7f9197f..abacc1b8 100644
--- a/docs/api-guide/fields.md
+++ b/docs/api-guide/fields.md
@@ -185,12 +185,20 @@ Corresponds to `django.forms.fields.RegexField`
A date representation.
+Uses `DATE_INPUT_FORMATS` to validate date.
+
+Optionally takes `format` as parameter to replace the matching pattern.
+
Corresponds to `django.db.models.fields.DateField`
## DateTimeField
A date and time representation.
+Uses `DATETIME_INPUT_FORMATS` to validate date_time.
+
+Optionally takes `format` as parameter to replace the matching pattern.
+
Corresponds to `django.db.models.fields.DateTimeField`
When using `ModelSerializer` or `HyperlinkedModelSerializer`, note that any model fields with `auto_now=True` or `auto_now_add=True` will use serializer fields that are `read_only=True` by default.
@@ -207,6 +215,10 @@ If you want to override this behavior, you'll need to declare the `DateTimeField
A time representation.
+Uses `TIME_INPUT_FORMATS` to validate time.
+
+Optionally takes `format` as parameter to replace the matching pattern.
+
Corresponds to `django.db.models.fields.TimeField`
## IntegerField