On Wed, 08 Jan 2014 14:31:16 +0100, max max@koehler-kn.de wrote:
Imho, we should instead show a little tooltip or something next to the input field that tells the user if certain characters are invalid. (This is a quite common pattern that most users should be familiar with). As you rightly pointed out though, an 'error' step should be avoided. Therefore, i suggest making the submit button unclickable until any invalid characters in the input field are replaced by the user.
I've made a little demo to make my concept a little clearer: http://cdpn.io/urwJf (Try entering an underscore in the 'username field')
I largely agree, but two points are to be made:
1. Obviously, some solution is still necessary for people with JavaScript disabled, and the currently proposed one is probably as good as any other in that case; personally I would very much welcome some JavaScript-based client-side enhancements to our forms;
2. Actual validation of a MediaWiki username is easier said than done; apart from just reimplementing the core checking and normalisation logic (which by itself probably takes a few hundred lines of code; some related work was done as the mediawiki.Title module, luckily) we also need to check with the server about which names are already used, about anti-spoofing, etc.
If anybody wants to implement this, by all means go ahead and I will be happy to help and review, but please don't block good solutions because better ones are possible.