Ticket #6092: 6092-docs.2.diff
File 6092-docs.2.diff, 2.9 KB (added by , 17 years ago) |
---|
-
docs/newforms.txt
1315 1315 moderately complex regular expression. 1316 1316 * Error message keys: ``required``, ``invalid`` 1317 1317 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 the1320 given length.1321 1318 1319 Also 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 1322 1329 ``FileField`` 1323 1330 ~~~~~~~~~~~~~ 1324 1331 … … 1482 1489 ``validator_user_agent`` String used as the user-agent used when checking for 1483 1490 a URL's existence. Defaults to the value of the 1484 1491 ``URL_VALIDATOR_USER_AGENT`` setting. 1492 ``regex`` A compiled regex which will be used instead of 1493 the default url validation pattern. 1485 1494 ======================== ===================================================== 1486 1495 1487 1496 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 ``regex``, which is a compiled regex which will be used instead 231 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 ``regex``, which is a compiled regex which will be used instead 480 of the default url validation regular expression pattern. 481 476 482 ``USStateField`` 477 483 ~~~~~~~~~~~~~~~~ 478 484