Ticket #8057: forms.patch

File forms.patch, 1.3 KB (added by Alper Cugun <djangoproject@…>, 16 years ago)
  • forms.txt

     
    15851585      ``<fieldname>`` is replaced with the name of the form field attribute.
    15861586      This method does any cleaning that is specific to that particular
    15871587      attribute, unrelated to the type of field that it is. This method is not
    1588       passed any parameters. You will need to look up the value of the field
    1589       in ``self.cleaned_data`` and remember that it will be a Python object
    1590       at this point, not the original string submitted in the form (it will be
    1591       in ``cleaned_data`` because the general field ``clean()`` method, above,
    1592       has already cleaned the data once).
     1588      passed any parameters and it needs to return the cleaned value. You will
     1589      need to look up the value of the field in ``self.cleaned_data`` and
     1590      remember that it will be a Python object at this point, not the original
     1591      string submitted in the form (it will be in ``cleaned_data`` because the
     1592      general field ``clean()`` method, above, has already cleaned the data
     1593      once).
    15931594
    15941595      For example, if you wanted to validate that the contents of a
    15951596      ``CharField`` called ``serialnumber`` was unique,
Back to Top