From c89d821d4e29ec98b2707a24fdf5a5616dcb0835 Mon Sep 17 00:00:00 2001 From: seamus tuohy Date: Sat, 3 Dec 2016 13:58:16 -0500 Subject: [PATCH] Updated AP to not accept spaces. --- copilot/views/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/copilot/views/forms.py b/copilot/views/forms.py index 68b044b..b0a4c86 100644 --- a/copilot/views/forms.py +++ b/copilot/views/forms.py @@ -69,7 +69,8 @@ class AdminConfig(Config): check_old_password]) ap_name = TextField('Trainee Access Point Name', validators=[ Optional(), - Length(min=1, max=31)]) + Length(min=1, max=31), + Regexp("^[^\s]*$", message="AP Name cannot contain any spaces or tabs.")]) ap_password = PasswordField('Access Point Password', validators=[ Optional(), Length(min=8, max=63),