Author: mtredinnick
Date: 2007-04-27 10:06:45 -0500 (Fri, 27 Apr 2007)
New Revision: 5113
Modified:
django/trunk/AUTHORS
django/trunk/docs/forms.txt
Log:
Fixed up some omissions and one mysteriously documented, yet non-existent field
in the validator documentation. Patch from [EMAIL PROTECTED] Refs #2266.
Modified: django/trunk/AUTHORS
===================================================================
--- django/trunk/AUTHORS 2007-04-27 14:27:07 UTC (rev 5112)
+++ django/trunk/AUTHORS 2007-04-27 15:06:45 UTC (rev 5113)
@@ -42,6 +42,7 @@
answer newbie questions, and generally made Django that much better:
[EMAIL PROTECTED]
+ [EMAIL PROTECTED]
Daniel Alves Barbosa de Oliveira Vaz <[EMAIL PROTECTED]>
Andreas
[EMAIL PROTECTED]
Modified: django/trunk/docs/forms.txt
===================================================================
--- django/trunk/docs/forms.txt 2007-04-27 14:27:07 UTC (rev 5112)
+++ django/trunk/docs/forms.txt 2007-04-27 15:06:45 UTC (rev 5113)
@@ -517,7 +517,7 @@
When are validators called?
---------------------------
-After a form has been submitted, Django validates each field in turn. First,
+After a form has been submitted, Django validates each field in turn. First,
if the field is required, Django checks that it is present and non-empty. Then,
if that test passes *and the form submission contained data* for that field,
all
the validators for that field are called in turn. The emphasized portion in the
@@ -615,15 +615,19 @@
``other_value``, then the validators in ``validator_list`` are all run
against the current field.
+``RequiredIfOtherFieldGiven``
+ Takes a field name of the current field is only required if the other
+ field has a value.
+
+``RequiredIfOtherFieldsGiven``
+ Similar to ``RequiredIfOtherFieldGiven``, except that it takes a list of
+ field names and if any one of the supplied fields has a value provided,
+ the current field being validated is required.
+
``RequiredIfOtherFieldNotGiven``
Takes the name of the other field and this field is only required if the
other field has no value.
-``RequiredIfOtherFieldsNotGiven``
- Similar to ``RequiredIfOtherFieldNotGiven``, except that it takes a list
- of field names and if any one of the supplied fields does not have a value
- provided, the field being validated is required.
-
``RequiredIfOtherFieldEquals`` and ``RequiredIfOtherFieldDoesNotEqual``
Each of these validator classes takes a field name and a value (in that
order). If the given field does (or does not have, in the latter case) the
@@ -650,8 +654,8 @@
``NumberIsInRange``
Takes two boundary numbers, ``lower`` and ``upper``, and checks that the
field is greater than ``lower`` (if given) and less than ``upper`` (if
- given).
-
+ given).
+
Both checks are inclusive. That is, ``NumberIsInRange(10, 20)`` will allow
values of both 10 and 20. This validator only checks numeric values
(e.g., float and integer values).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---