I have a login form and a register form on my website in this format:
Username: [ ]
Password: [ ]
Email: [ ]
There are multiple ways to approach informing the user of invalid register data:
1) If the user inputs an invalid username change the Username label from black to red.
2) Additionally, a site admin could also display a watermark on each textbox to indicate valid input.
3) A label could be prepended or appended to the form indicating the reason for failure. For example, after the submission failed before Username or after Email it would state something like, "Inputted username is invalid. Must contain only alphanumeric characters."
4) Likewise, the error message could be positioned to the right of the textbox associated with the incorrect input value. For example, if the username was incorrect then to the right of the Username textbox, in red, it may state "Inputted username is invalid. Must contain only alphanumeric characters."
I'm sure there are many other ways to do it. The only problem I see with the first method is that it may not be as color-blind assessable. With all other methods additional labels containing messages are created to display to the user.
How would User Experience solve this problem? What is the most elegant solution to this common problem?