Added a validation for a minimum of 3 character.

If the SMS sender is less than 3 characters one of our providers will return an error.
This commit is contained in:
Rebecca Law
2018-02-15 16:06:44 +00:00
parent fcc5c4e3e9
commit 6bd99e0599
2 changed files with 5 additions and 0 deletions

View File

@@ -561,6 +561,7 @@ class ServiceSmsSenderForm(StripWhitespaceForm):
validators=[
DataRequired(message="Cant be empty"),
Length(max=11, message="Enter 11 characters or fewer"),
Length(min=3, message="Enter 3 characters or more"),
LettersNumbersAndFullStopsOnly(),
]
)