|
@@ -299,7 +299,7 @@ as the rendered output.
|
|
|
See the :ref:`format localization <format-localization>` documentation for
|
|
|
more information.
|
|
|
|
|
|
-.. _built-in fields:
|
|
|
+.. _built-in-fields:
|
|
|
|
|
|
Built-in ``Field`` classes
|
|
|
--------------------------
|
|
@@ -427,7 +427,7 @@ For each field, we describe the default widget used if you don't specify
|
|
|
|
|
|
If no ``input_formats`` argument is provided, the default input formats are::
|
|
|
|
|
|
- ['%Y-%m-%d', # '2006-10-25'
|
|
|
+ ['%Y-%m-%d', # '2006-10-25'
|
|
|
'%m/%d/%Y', # '10/25/2006'
|
|
|
'%m/%d/%y'] # '10/25/06'
|
|
|
|
|
@@ -957,12 +957,12 @@ Slightly complex built-in ``Field`` classes
|
|
|
def __init__(self, *args, **kwargs):
|
|
|
# Define one message for all fields.
|
|
|
error_messages = {
|
|
|
- 'incomplete': 'Enter a country code and phone number.',
|
|
|
+ 'incomplete': 'Enter a country calling code and a phone number.',
|
|
|
}
|
|
|
# Or define a different message for each field.
|
|
|
fields = (
|
|
|
- CharField(error_messages={'incomplete': 'Enter a country code.'},
|
|
|
- validators=[RegexValidator(r'^[0-9]+$', 'Enter a valid country code.')]),
|
|
|
+ CharField(error_messages={'incomplete': 'Enter a country calling code.'},
|
|
|
+ validators=[RegexValidator(r'^[0-9]+$', 'Enter a valid country calling code.')]),
|
|
|
CharField(error_messages={'incomplete': 'Enter a phone number.'},
|
|
|
validators=[RegexValidator(r'^[0-9]+$', 'Enter a valid phone number.')]),
|
|
|
CharField(validators=[RegexValidator(r'^[0-9]+$', 'Enter a valid extension.')],
|