HTBox / allReady

This repo contains the code for allReady, an open-source solution focused on increasing awareness, efficiency and impact of preparedness campaigns as they are delivered by humanitarian and disaster response organizations in local communities.
http://www.htbox.org/projects/allready
MIT License
891 stars 626 forks source link

Issues with data validation on Create Organization page, privacy url #1351

Open atthetestlab opened 8 years ago

atthetestlab commented 8 years ago

Creating Org, URL for Privacy Policy URL requires significant formatting, doesn't prompt user: Didn't Work: yahoo.com www.yahoo.com www.yahoo.com/privacy www.yahoo.com/privacy.html

Once I added some sort of protocol: gopher://www.yahoo.com/privacy.html, I was prompted to use "The Privacy Policy URL field is not a valid fully-qualified http, https, or ftp URL."

recumbent commented 7 years ago

As at NDC London the field has an input type of url which means that its the browser (strictly the user agent) that validates the input and this fires before the MVC validation.

Testing on both chrome and edge shows equivalent behaviour in requiring the http:// in order for the entry to be "valid" and in showing an error when you click the create button

Edge: image

Chrome: image

@stevejgordon

stevejgordon commented 7 years ago

My guess was that this issue was more around explaining to the user what is expected (i.e. protocol required) so that the invalid URL message is more easy to understand. It might just be some UI hints we need.

recumbent commented 7 years ago

@stevejgordon happy to agree - the biggest issue here is that the browser validation pre-empts the rest of the validation - so it is, at the very least, inconsistent with the other MVC validation - but its also not obvious from the error what's missing.

I suppose that leads to a broader question of UI hints / help / documentation.