Skip to content

Commit

Permalink
Updated Brazil phone number format.
Browse files Browse the repository at this point in the history
  • Loading branch information
cadusk committed Jul 30, 2012
1 parent e567f43 commit 46a1e3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/contrib/localflavor/br/forms.py
Expand Up @@ -15,7 +15,7 @@
from django.utils.translation import ugettext_lazy as _


phone_digits_re = re.compile(r'^(\d{2})[-\.]?(\d{4})[-\.]?(\d{4})$')
phone_digits_re = re.compile(r'^(\d{2})[-\.]?(\d{4,5})[-\.]?(\d{4})$')

class BRZipCodeField(RegexField):
default_error_messages = {
Expand All @@ -28,7 +28,7 @@ def __init__(self, max_length=None, min_length=None, *args, **kwargs):

class BRPhoneNumberField(Field):
default_error_messages = {
'invalid': _('Phone numbers must be in XX-XXXX-XXXX format.'),
'invalid': _('Phone numbers must be in XX-XXXXX-XXXX format.'),
}

def clean(self, value):
Expand Down

0 comments on commit 46a1e3c

Please sign in to comment.