Django

Code

Changeset 5113

Show
Ignore:
Timestamp:
04/27/07 10:06:45 (1 year ago)
Author:
mtredinnick
Message:

Fixed up some omissions and one mysteriously documented, yet non-existent field
in the validator documentation. Patch from alang@bright-green.com. Refs #2266.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/AUTHORS

    r5110 r5113  
    4343 
    4444    adurdin@gmail.com 
     45    alang@bright-green.com 
    4546    Daniel Alves Barbosa de Oliveira Vaz <danielvaz@gmail.com> 
    4647    Andreas 
  • django/trunk/docs/forms.txt

    r5064 r5113  
    518518--------------------------- 
    519519 
    520 After a form has been submitted, Django validates each field in turn. First,  
     520After a form has been submitted, Django validates each field in turn. First, 
    521521if the field is required, Django checks that it is present and non-empty. Then, 
    522522if that test passes *and the form submission contained data* for that field, all 
     
    616616    against the current field. 
    617617 
     618``RequiredIfOtherFieldGiven`` 
     619    Takes a field name of the current field is only required if the other 
     620    field has a value. 
     621 
     622``RequiredIfOtherFieldsGiven`` 
     623    Similar to ``RequiredIfOtherFieldGiven``, except that it takes a list of 
     624    field names and if any one of the supplied fields has a value provided, 
     625    the current field being validated is required. 
     626 
    618627``RequiredIfOtherFieldNotGiven`` 
    619628    Takes the name of the other field and this field is only required if the 
    620629    other field has no value. 
    621  
    622 ``RequiredIfOtherFieldsNotGiven`` 
    623     Similar to ``RequiredIfOtherFieldNotGiven``, except that it takes a list 
    624     of field names and if any one of the supplied fields does not have a value 
    625     provided, the field being validated is required. 
    626630 
    627631``RequiredIfOtherFieldEquals`` and ``RequiredIfOtherFieldDoesNotEqual`` 
     
    651655    Takes two boundary numbers, ``lower`` and ``upper``, and checks that the 
    652656    field is greater than ``lower`` (if given) and less than ``upper`` (if 
    653     given).   
    654      
     657    given). 
     658 
    655659    Both checks are inclusive. That is, ``NumberIsInRange(10, 20)`` will allow 
    656660    values of both 10 and 20. This validator only checks numeric values