diff options
author | Akshen | 2017-06-23 12:54:43 +0530 |
---|---|---|
committer | Akshen | 2017-06-23 12:54:43 +0530 |
commit | ed5b29cec9254eef7b02c8aeed3ddca4390e24e3 (patch) | |
tree | ec883649c5c7c6766978db143942417470977aa4 /workshop_app/forms.py | |
parent | 8047cfb34d05521bcb97b8dd1dd07dfd16739e73 (diff) | |
download | workshop_booking-ed5b29cec9254eef7b02c8aeed3ddca4390e24e3.tar.gz workshop_booking-ed5b29cec9254eef7b02c8aeed3ddca4390e24e3.tar.bz2 workshop_booking-ed5b29cec9254eef7b02c8aeed3ddca4390e24e3.zip |
Fixes Regex Issue
Diffstat (limited to 'workshop_app/forms.py')
-rw-r--r-- | workshop_app/forms.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/workshop_app/forms.py b/workshop_app/forms.py index 90ca733..cce6dfc 100644 --- a/workshop_app/forms.py +++ b/workshop_app/forms.py @@ -51,9 +51,9 @@ class UserRegistrationForm(forms.Form): (max_length=32, widget=forms.PasswordInput()) first_name = forms.CharField(max_length=32) last_name = forms.CharField(max_length=32) - phone_number = forms.RegexField(regex=r'^\+?1?\d{9,15}$', + phone_number = forms.RegexField(regex=r'^.{10}$', error_message=("Phone number must be entered \ - in the format: '+999999999'.\ + in the format: '9999999999'.\ Up to 10 digits allowed.")) institute = forms.CharField(max_length=128, help_text='Please write full name of your Institute/Organization') |