opengovsg/FormSG

Feature: Easier whitelisting of email domains (simple patterns or flags)

aniruddha-adhikary opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
Whenever I want to open up a form for Public Officers, I need to list down a whole bunch of domain names. I need to look up a list of every possible .gov.sg domain name. This is counter-productive. Often, some forms do not whitelist newer agency domains.

Describe the solution you'd like

  1. A pattern based email domain whitelisting, i.e, @*.gov.sg, @*.edu.sg.
    Screenshot 2024-02-14 at 12 20 22
    I prefer this solution because this gives flexibility to users, without burdening the developers of FormSG.

    I realized this opens up cans of worms too. Do we allow unlimited nested subdomains for a wildcard? Like does *.tech.gov.sg allows data.tech.gov.sg AND subdomain.data.tech.gov.sg? Or should it be more like glob patterns (**)

  2. (Not my favorite) Have a toggle. (This feels extra burden to maintain)
    Screenshot 2024-02-14 at 12 23 35

Describe alternatives you've considered

  1. Pasting in a ever-changing list of possible .gov.sg emails. This is quite troublesome, and with the introduction of new .gov.sg emails, old forms would need manually updating. A simple pattern may prevent this.