I’ve hit a blank here and would appreciate a kick start.
I have two password textboxes on a page, and on load I default their value properties to a string of ‘*’, since I don’t want to display the proper password, or even hint at its length. Now I don’t want to confuse users by letting them edit these blank strings, so on focus I clear the textbox. Now my code thinks the password has changed and will save the blank value, which is allowed, but not intended.
I don’t know the reason behind having a blank password (I guess it’ll allow limited access perhaps?), but I’d say, ironically, for security purposes, add a check box saying ‘No password’, and disable the password-entry field if it’s checked. This way it’ll be explicit that the password will be blank, and if there are any consequences for this (limited access, captcha requirements, whatever), the user is hopefully aware that checking this box also has those implications.