mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-26 01:04:00 -04:00
Text message not Sms
This commit is contained in:
@@ -337,7 +337,7 @@ class ServiceSmsSender(Form):
|
|||||||
def validate_sms_sender(form, field):
|
def validate_sms_sender(form, field):
|
||||||
import re
|
import re
|
||||||
if field.data and 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')
|
raise ValidationError('Text message sender can only contain alpha-numeric characters')
|
||||||
|
|
||||||
|
|
||||||
class ServiceBrandingOrg(Form):
|
class ServiceBrandingOrg(Form):
|
||||||
|
|||||||
@@ -141,4 +141,4 @@ def test_sms_sender_form_validation(app_, mock_get_user_by_email):
|
|||||||
|
|
||||||
form.sms_sender.data = '###########'
|
form.sms_sender.data = '###########'
|
||||||
form.validate()
|
form.validate()
|
||||||
assert 'Sms text message sender can only contain alpha-numeric characters' == form.errors['sms_sender'][0]
|
assert 'Text message sender can only contain alpha-numeric characters' == form.errors['sms_sender'][0]
|
||||||
|
|||||||
Reference in New Issue
Block a user