Ticket #6092: 6092-docs.2.diff

File 6092-docs.2.diff, 2.9 KB (added by floguy, 16 years ago)

Updated documentation to match the new patch.

  • docs/newforms.txt

     
    13151315      moderately complex regular expression.
    13161316    * Error message keys: ``required``, ``invalid``
    13171317
    1318 Has two optional arguments for validation, ``max_length`` and ``min_length``.
    1319 If provided, these arguments ensure that the string is at most or at least the
    1320 given length.
    13211318
     1319Also takes the following optional arguments:
     1320    ======================  =====================================================
     1321    Argument                Description
     1322    ======================  =====================================================
     1323    ``max_length``          Ensures the string has at most this many characters.
     1324    ``min_length``          Ensures the string has at least this many characters.
     1325    ``regex``               A compiled regex which will be used instead of the
     1326                            default email validation pattern.
     1327    ======================  =====================================================
     1328
    13221329``FileField``
    13231330~~~~~~~~~~~~~
    13241331
     
    14821489    ``validator_user_agent``  String used as the user-agent used when checking for
    14831490                              a URL's existence. Defaults to the value of the
    14841491                              ``URL_VALIDATOR_USER_AGENT`` setting.
     1492    ``regex``                 A compiled regex which will be used instead of
     1493                              the default url validation pattern.
    14851494    ========================  =====================================================
    14861495
    14871496Slightly complex built-in ``Field`` classes
  • docs/model-api.txt

     
    227227automatically set to 75. In the Django development version, ``max_length`` is
    228228set to 75 by default, but you can specify it to override default behavior.
    229229
     230It also accepts ``regex``, which is a compiled regex which will be used instead
     231of the default email validation regular expression pattern.
     232
    230233``FileField``
    231234~~~~~~~~~~~~~
    232235
     
    468471
    469472The admin represents this as an ``<input type="text">`` (a single-line input).
    470473
    471 ``URLField`` takes an optional argument, ``max_length``, the maximum length (in
    472 characters) of the field. The maximum length is enforced at the database level and
    473 in Django's validation. If you don't specify ``max_length``, a default of 200
     474``URLField`` takes two optional arguments.  The first is ``max_length``, the maximum
     475length (in characters) of the field. The maximum length is enforced at the database
     476level and in Django's validation. If you don't specify ``max_length``, a default of 200
    474477is used.
    475478
     479The second is ``regex``, which is a compiled regex which will be used instead
     480of the default url validation regular expression pattern.
     481
    476482``USStateField``
    477483~~~~~~~~~~~~~~~~
    478484
Back to Top