Can remove sms sender.

This commit is contained in:
Adam Shimali
2016-07-01 16:32:21 +01:00
parent 3bfcf0f8b3
commit 1efd8506db
2 changed files with 5 additions and 1 deletions

View File

@@ -327,5 +327,5 @@ class ServiceSmsSender(Form):
def validate_sms_sender(form, field):
import re
if not re.match('^[a-zA-Z0-9\s]+$', field.data):
if field.data and not re.match('^[a-zA-Z0-9\s]+$', field.data):
raise ValidationError('Sms text message sender can only contain alpha-numeric characters')