HTBox / crisischeckin

Crisischeckin Humanitarian Toolbox repository
Apache License 2.0
173 stars 157 forks source link

Invalid phone numbers can be entered when registering. #293

Open dneelyep opened 9 years ago

dneelyep commented 9 years ago

On the staging site, it is possible to enter an invalid phone number when registering. capture A length constraint should probably be added to this field, and the constraint should (I'm assuming) be applied to the Person table's PhoneNumber field as well.

BanksySan commented 9 years ago

I've spotted that in the front end tests I'm working on as well. If this is going to be international and in a crisis zone, it might be wise in this case not to restrict it so that peeps can enter things like:

"012456789 until May, 987654321 afterwords"

Especially as there doesn't seem to be a way for a user to enter this sort of info.

BillWagner commented 9 years ago

@BanksySan is correct here. We want to leave this open at this time. (Or at least not too restrictive). There are many different formats for phone numbers, and until we have a way to validate all variants (hopefully through a 3rd party service), we don't want to disallow valid data.

dneelyep commented 9 years ago

Ok cool, makes sense to me.