mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
validate email addresses in one-off flow
previously we were just using the wtforms builtin email validator, which is much more relaxed than our own one. It'd catch bad emails when POSTing to the API, resulting in an ugly error message. It's easy work to make sure we validate email addresses as soon as they're entered.
This commit is contained in:
@@ -22,6 +22,7 @@ def test_form_class_not_mutated(app_):
|
||||
|
||||
(False, 'email address', '', 'Can’t be empty'),
|
||||
(False, 'email address', '12345', 'Enter a valid email address'),
|
||||
(False, 'email address', '“bad”@email-address.com', 'Enter a valid email address'),
|
||||
(False, 'email address', 'test@example.com', None),
|
||||
(False, 'email address', 'test@example.gov.uk', None),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user