Results 1 to 4 of 4

Thread: Returning A Validation Error

  1. #1
    Join Date
    Jul 2006

    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...

  2. #2
    Join Date
    Aug 2006
    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

  3. #3
    Join Date
    Aug 2004
    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.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  4. #4
    Join Date
    Jul 2006
    Cool, thanks all... much appreciated...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center