mirror of
https://github.com/django/django.git
synced 2025-12-15 21:45:20 +00:00
Fixed #22378 -- Updated \d to [0-9]+ in urlpatterns of docs and tests.
Thanks tomwys for the suggestion.
This commit is contained in:
parent
030dd4f72c
commit
66ec9ee441
38 changed files with 181 additions and 181 deletions
|
|
@ -930,10 +930,10 @@ Slightly complex built-in ``Field`` classes
|
|||
# Or define a different message for each field.
|
||||
fields = (
|
||||
CharField(error_messages={'incomplete': 'Enter a country code.'},
|
||||
validators=[RegexValidator(r'^\d+$', 'Enter a valid country code.')]),
|
||||
validators=[RegexValidator(r'^[0-9]+$', 'Enter a valid country code.')]),
|
||||
CharField(error_messages={'incomplete': 'Enter a phone number.'},
|
||||
validators=[RegexValidator(r'^\d+$', 'Enter a valid phone number.')]),
|
||||
CharField(validators=[RegexValidator(r'^\d+$', 'Enter a valid extension.')],
|
||||
validators=[RegexValidator(r'^[0-9]+$', 'Enter a valid phone number.')]),
|
||||
CharField(validators=[RegexValidator(r'^[0-9]+$', 'Enter a valid extension.')],
|
||||
required=False),
|
||||
)
|
||||
super(PhoneField, self).__init__(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue