Ticket #14708: form-field-errors.diff

File form-field-errors.diff, 2.6 KB (added by Adam Vandenberg, 14 years ago)
  • docs/ref/forms/fields.txt

    diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
    index 7f18c67..f93120d 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::  
    464467      ``min_value``, ``max_digits``, ``max_decimal_places``,
    465468      ``max_whole_digits``
    466469
     470The ``max_value`` and ``min_value`` error messages may contain
     471``%(limit_value)s``, which will be substituted by the appropriate limit.
     472
    467473Takes four optional arguments:
    468474
    469475.. attribute:: DecimalField.max_value
    given length.  
    514520    * Normalizes to: An ``UploadedFile`` object that wraps the file content
    515521      and file name into a single object.
    516522    * Validates that non-empty file data has been bound to the form.
    517     * Error message keys: ``required``, ``invalid``, ``missing``, ``empty``
     523    * Error message keys: ``required``, ``invalid``, ``missing``, ``empty``,
     524      ``max_length``
    518525
    519526To learn more about the ``UploadedFile`` object, see the :doc:`file uploads
    520527documentation </topics/http/file-uploads>`.
    documentation </topics/http/file-uploads>`.  
    522529When you use a ``FileField`` in a form, you must also remember to
    523530:ref:`bind the file data to the form <binding-uploaded-files>`.
    524531
     532The ``max_length`` error refers to the length of the filename. ``%(max)d``
     533will be replaced with the maximum filename length and ``%(length)d`` will be
     534replaced with the current filename length.
     535
    525536``FilePathField``
    526537~~~~~~~~~~~~~~~~~
    527538
    When you use an ``ImageField`` on a form, you must also remember to  
    604615    * Error message keys: ``required``, ``invalid``, ``max_value``,
    605616      ``min_value``
    606617
     618The ``max_value`` and ``min_value`` error messages may contain
     619``%(limit_value)s``, which will be substituted by the appropriate limit.
     620
    607621Takes two optional arguments for validation:
    608622
    609623.. attribute:: IntegerField.max_value
    Takes two optional arguments for validation:  
    635649      of choices.
    636650    * Error message keys: ``required``, ``invalid_choice``, ``invalid_list``
    637651
     652For the ``invalid_choice`` error, ``%(value)s`` will be replaced with the
     653selected choice.
     654
    638655Takes one extra argument, ``choices``, as for ``ChoiceField``.
    639656
    640657``NullBooleanField``
Back to Top