mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 09:21:39 -05:00
we allow some invalid to addresses - for example, phone numbers with spaces or brackets - in the database. This is so that users can match up their data in a format that they expect (since they passed it in). When we send SMS, we strip this formatting just before sending - but we weren't with email. This commit changes that and adds some tests. It also adds formatting for reply_to addresses. We should never expect invalid reply_to email addresses in our data, but just in case, lets validate them here. Also, bump requirements.txt to capture some more email validation