Ticket #6092: 6092-docs.diff
File 6092-docs.diff, 3.0 KB (added by , 17 years ago) |
---|
-
docs/newforms.txt
1311 1311 moderately complex regular expression. 1312 1312 * Error message keys: ``required``, ``invalid`` 1313 1313 1314 Has two optional arguments for validation, ``max_length`` and ``min_length``.1315 If provided, these arguments ensure that the string is at most or at least the1316 given length.1317 1314 1315 Also takes the following optional arguments: 1316 ====================== ===================================================== 1317 Argument Description 1318 ====================== ===================================================== 1319 ``max_length`` Ensures the string has at most this many characters. 1320 ``min_length`` Ensures the string has at least this many characters. 1321 ``pattern`` A compiled regex or string which will be used instead 1322 of the default email validation regular expression. 1323 ====================== ===================================================== 1324 1318 1325 ``FileField`` 1319 1326 ~~~~~~~~~~~~~ 1320 1327 … … 1478 1485 ``validator_user_agent`` String used as the user-agent used when checking for 1479 1486 a URL's existence. Defaults to the value of the 1480 1487 ``URL_VALIDATOR_USER_AGENT`` setting. 1488 ``pattern`` A compiled regex or string which will be used instead 1489 of the default url validation regular expression. 1481 1490 ======================== ===================================================== 1482 1491 1483 1492 Slightly complex built-in ``Field`` classes -
docs/model-api.txt
227 227 automatically set to 75. In the Django development version, ``max_length`` is 228 228 set to 75 by default, but you can specify it to override default behavior. 229 229 230 It also accepts ``pattern``, which is a compiled regex or string which will be 231 used instead of the default email validation regular expression pattern. 232 230 233 ``FileField`` 231 234 ~~~~~~~~~~~~~ 232 235 … … 468 471 469 472 The admin represents this as an ``<input type="text">`` (a single-line input). 470 473 471 ``URLField`` takes an optional argument, ``max_length``, the maximum length (in472 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 200474 ``URLField`` takes two optional arguments. The first is ``max_length``, the maximum 475 length (in characters) of the field. The maximum length is enforced at the database 476 level and in Django's validation. If you don't specify ``max_length``, a default of 200 474 477 is used. 475 478 479 The second is ``pattern``, which is a compiled regex or string which will be used instead 480 of the default url validation regular expression pattern. 481 476 482 ``USStateField`` 477 483 ~~~~~~~~~~~~~~~~ 478 484