Ticket #14708: document-mapping-keys.diff

File document-mapping-keys.diff, 3.0 KB (added by Adam Vandenberg, 14 years ago)

Rebased against trunk.

  • docs/ref/forms/fields.txt

    diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
    index b36c9cc..2228671 100644
    a b Has two optional arguments for validation:  
    347347    * Validates that the given value exists in the list of choices.
    348348    * Error message keys: ``required``, ``invalid_choice``
    349349
     350For the ``invalid_choice`` error, ``%(value)s`` will be replaced with the
     351selected choice.
     352
    350353Takes one extra required argument:
    351354
    352355.. attribute:: ChoiceField.choices
    If no ``input_formats`` argument is provided, the default input formats are::  
    465468      ``min_value``, ``max_digits``, ``max_decimal_places``,
    466469      ``max_whole_digits``
    467470
     471The ``max_value`` and ``min_value`` error messages may contain
     472``%(limit_value)s``, which will be substituted by the appropriate limit.
     473
    468474Takes four optional arguments:
    469475
    470476.. attribute:: DecimalField.max_value
    given length.  
    515521    * Normalizes to: An ``UploadedFile`` object that wraps the file content
    516522      and file name into a single object.
    517523    * Validates that non-empty file data has been bound to the form.
    518     * Error message keys: ``required``, ``invalid``, ``missing``, ``empty``
     524    * Error message keys: ``required``, ``invalid``, ``missing``, ``empty``,
     525      ``max_length``
    519526
    520527To learn more about the ``UploadedFile`` object, see the :doc:`file uploads
    521528documentation </topics/http/file-uploads>`.
    documentation </topics/http/file-uploads>`.  
    523530When you use a ``FileField`` in a form, you must also remember to
    524531:ref:`bind the file data to the form <binding-uploaded-files>`.
    525532
     533The ``max_length`` error refers to the length of the filename. ``%(max)d``
     534will be replaced with the maximum filename length and ``%(length)d`` will be
     535replaced with the current filename length.
     536
    526537``FilePathField``
    527538~~~~~~~~~~~~~~~~~
    528539
    When you use an ``ImageField`` on a form, you must also remember to  
    605616    * Error message keys: ``required``, ``invalid``, ``max_value``,
    606617      ``min_value``
    607618
     619The ``max_value`` and ``min_value`` error messages may contain
     620``%(limit_value)s``, which will be substituted by the appropriate limit.
     621
    608622Takes two optional arguments for validation:
    609623
    610624.. attribute:: IntegerField.max_value
    Takes two optional arguments for validation:  
    636650      of choices.
    637651    * Error message keys: ``required``, ``invalid_choice``, ``invalid_list``
    638652
     653For the ``invalid_choice`` error, ``%(value)s`` will be replaced with the
     654selected choice.
     655
    639656Takes one extra required argument, ``choices``, as for ``ChoiceField``.
    640657
    641658``TypedMultipleChoiceField``
    takes two extra arguments, ``coerce`` and ``empty_value``.  
    654671      coerced.
    655672    * Error message keys: ``required``, ``invalid_choice``
    656673
     674For the ``invalid_choice`` error, ``%(value)s`` will be replaced with the
     675selected choice.
     676
    657677Takes two extra arguments, ``coerce`` and ``empty_value``, as for ``TypedChoiceField``.
    658678
    659679``NullBooleanField``
Back to Top