Treat empty username as invalid in user editor user/jeff/fix_lp1246846_blank_username
authorJeff Godin <jgodin@tadl.org>
Wed, 30 Oct 2013 19:29:24 +0000 (15:29 -0400)
committerJeff Godin <jgodin@tadl.org>
Fri, 27 Dec 2013 20:07:04 +0000 (15:07 -0500)
commitcc3c2393c4d38ff33cc5b4c50a54f36892b51433
tree20d75890bd6f98ea25922ed852d42f8a6b1bbb02
parent5e373d30ab716a94de7521409e12c1fdabcee5a9
Treat empty username as invalid in user editor

There seems to be undesired interaction between the required
attribute and the isValid method on a dojo/dijit ValidationTextBox.
If both are set, isValid needs to check for an empty value,
otherwise the field is considered valid the moment it gains focus.

We don't want an empty username to be considered valid, because we
know that we will be unable to save the user.

We can work around this by teaching the isValid function to consider
an empty value as invalid.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/web/js/ui/default/actor/user/register.js