Ticket #11374: boolfield_patch.diff

File boolfield_patch.diff, 1.2 KB (added by lygaret, 15 years ago)
  • docs/ref/forms/fields.txt

     
    275275    * Default widget: ``CheckboxInput``
    276276    * Empty value: ``False``
    277277    * Normalizes to: A Python ``True`` or ``False`` value.
    278     * Validates that the check box is checked (i.e. the value is ``True``) if
     278    * Validates that the value is ``True`` (e.g. the check box is checked) if
    279279      the field has ``required=True``.
    280280    * Error message keys: ``required``
    281281
     
    287287.. note::
    288288
    289289    Since all ``Field`` subclasses have ``required=True`` by default, the
    290     validation condition here is important. If you want to include a checkbox
    291     in your form that can be either checked or unchecked, you must remember to
    292     pass in ``required=False`` when creating the ``BooleanField``.
     290    validation condition here is important. If you want to include a boolean
     291    in your form that can be either ``True`` or ``False`` (e.g. a checked or
     292    unchecked checkbox), you must remember to pass in ``required=False`` when
     293    creating the ``BooleanField``.
    293294
    294295``CharField``
    295296~~~~~~~~~~~~~
Back to Top