Returning A Validation Error
Hi, i am in the middle of coding some server side validation for a Create Account form for my website.
I am trying to decide what the best and most elaborate way is to the return server side validation errors. I currently have a "slick" interface working with jQuery and Ajax BUT i want to be able to return the errors in a "slick" way IF my user decides to turn JS off.
The options i have seen are:
- return all the errors in red on a new page, with a back button
- return the errors in red at the top of the Create Account page
- return the errors at for each field in red directly above each filed
01 - what other options are there out here
02 - what option would you suggest
Thanks in advance for your help...
it's really up to you, but assuming you can use css you can just change the border on the form field red or orange. i usually make the borde rof the field red and use innerHTML to insert an error message into a hidden box next to the field
I would try to avoid the first choice (having to use the back button).
I kind of like to summarize the errors in one place (e.g. at the top of the form or page) and then do something to highlight the affected fields (along the sorts of choices bsmhahamas was referring to). If things are a bit cramped, you could highlight the affected fields in some way (background and/or text color?) and add a title attribute to the input element with the relevant error message for that field, so if the user mouses over it, they'll see the message pop up tool-tip-like.
So, yeah, there are lots of choices.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Cool, thanks all... much appreciated...
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)