by josh » Tue Feb 03, 2004 6:06 pm
I've got the functionality in place for adding a new address, sort of -- it needs to be "hardened" a bit, mostly as regards error handling:
there's the issue of when the user tries to create a new address, but actually already has the "word" for the address in an existing disposable. I suppose we should return to the form page with an appropriate error message, and perhaps the address SELECTed? Right now, I'm using the database primary key (number) as the value of the select options -- perhaps we could change that to the "words", then if the user inputs a word, we can use javascript to check it against the list of options and throw an alert if there's a match (I don't know how to do this off the top of my head, but I'm pretty sure it's not too difficult -- if it is, we can just include all the words in a javascript array on the page and use that for validation). We'd also need to handle it on the back end for users w/o javascript. Also, I'm excluding hidden addresses from the list, so we'd need to work that out somehow, maybe by just including them.
I just hard-coded the list of (some of the) domains for now. There's a more "official" list of them in a config file, that I'll hit for the droplist. There are other domains -- some of which I don't even know about, I'm sure, that users have set up per the item in the FAQ. It would be nice to allow the users to use one of those domains, as well, but I can't think of a sensible way to validate them. Of course, if the users provide domains that don't work, and we accept them, they'll never hear back from the recipients of their messages.
Also, when I created a new address, everything worked when I sent the message, but when I received it, it was missing the Subject tagline -- a couple of other users, including Eugeny, the Russian translator, have seen this problem in other contexts, so maybe it's the same thing.